From patchwork Fri Feb 24 18:08:51 2023 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: 656260 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1043547wrb; Fri, 24 Feb 2023 10:10:29 -0800 (PST) X-Google-Smtp-Source: AK7set/lTi2ALNBhNOR8wO161aOEeJknfQ98amk1mQ98yulp9r9T1rJhNLtxbtS5MDOSo0LfG3J8 X-Received: by 2002:a05:622a:1752:b0:3bf:ab9d:d322 with SMTP id l18-20020a05622a175200b003bfab9dd322mr1014528qtk.10.1677262229753; Fri, 24 Feb 2023 10:10:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677262229; cv=none; d=google.com; s=arc-20160816; b=J3xeATHbHO/yX2VsxYs9caDJiYQGfQkCz5Q96YUmXes02Gow9m0Atvr6pS943jEVQK b5NHeT0ZQ1we+CntOF3YRQMj7iGeQufyanz4SEYioQkgFHl4MjaKTaaR88qcrhVKL/AU KCdRBcx1Ig1S54I2Einm+L4qdx4Ais1LnCs+N+n8pjte+ko+8S6W2W4pK4P8ma/CGfK7 fq1gaxMkpkuwzPvl/Gw9u7M6ipBAtccSvxhqOSOBUPQ0xAWGad8+p7hmjNzfiA/qlUk7 p3XmDrctR6oDD28kSDFGL7/9NseSWhn5qAMY9pIAerlT6tqzlVwCKGy2oiJIFlINnCmj 0+5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=sWlMo82fjyi0DYAw1U4gGmbZ7Vz62HpgPG/tbr6QTr0=; b=BadB8QTmZsQpet0PZ+kwMafxCnCwdzBg9pvVmNq4JXvcVVnQ20NOzNOQDrvXLX6k2n UyFIQqdt3U7z8ref0vF+idByWFQJDIxDBCrEBPLgknZbcUMjrc/+cyKAG0jIdDtPf5aX OJV6fElmraRd+J4s7zi25Jhzzvi7KUJYfhbord3pVEGrlFZopAM/ew/F92Ly8vRJdJx7 l2O6Xx693Thli8Et05V0a/whdg1M54YOY4+Lhnn/Hsexg5OdJDBED68rKFhmIGkwTAQH c4Kav3VNlt1EacDB0NPvWTwJhRjRARH0MhPI7ZS8zWFsH3xDLwEn8eU3OqP/gpPdegoW cPig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nozBLWQX; 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=pass (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 o16-20020a05622a139000b003bd06c84120si5440205qtk.661.2023.02.24.10.10.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Feb 2023 10:10:29 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=nozBLWQX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVcVF-00055C-4t; Fri, 24 Feb 2023 13:09:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVcVD-00053u-Lt for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:03 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVcVA-0004ns-Nf for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:03 -0500 Received: by mail-wr1-x42d.google.com with SMTP id 6so4675wrb.11 for ; Fri, 24 Feb 2023 10:09:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sWlMo82fjyi0DYAw1U4gGmbZ7Vz62HpgPG/tbr6QTr0=; b=nozBLWQXs6DSnx1BjgtmCkYxH5eCBy644EmdEqZ/sh9vdqK0Ft2g8dzFtVSB9zt7Gz 8dhp9u9ZnskKeQ3PpSl3UXTZO77QF3lQdPPI0IiuO1+7+LYhPOsnXcj8SdmW2w+do/KH bOqgJs0+BoSmMAgXu4uk8lwRDLPRbG5yiTJjs5MMXuM8Snp1lyH02f67H0wmCgZ1awFR +l6wnC3qsBDvrVBtOiAFig9rTGcrMg4dU38O+9IuDK+j7CZKqyeEYGwbdlW1Yhglh0II GPdKf9GX51XmW4OFdCqyWBhJx2cf9533fPn6lCEL2nGsmnkzRAJap5uDDFIkXuMi/gAD J3Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sWlMo82fjyi0DYAw1U4gGmbZ7Vz62HpgPG/tbr6QTr0=; b=sj4PeCD3UjE0AZn5kLgeTIVM+4zaPiuUSSw1wEweczWh77F6VRRxHfkrgsciqr2yJo jKj6m2jYYNKp+oqf4L0lGjDrCughLya0C4D1OtjpVzgtSt1KlPeB3UwVKmo9gXRLZELY ucFZf6AU1WKamQuKpg4jslUKF/1ez64SIFdxoMobJ4ufb/OI/oGizeqpU/ky8gATXnrG sqVV8+0eWkgMmTQHYMiFtkplTP9JSny8S2j4PenSnjBw4qzefqwXDmIU2XFQ2zpzA48o s2nwzeNPiUBymtO0gX2k0vSDUq/h3QmTjKxTohFcpujE5NL4uQw4E+c+B65bgFcsUBqm 5pCA== X-Gm-Message-State: AO0yUKWs104r5mSCspni0WL1Au5J7fBfP0KXQ9iCAHRZ2bT0p73aV2da t8KxftesxTHivCD7wZAmF/ew8A== X-Received: by 2002:a05:6000:1151:b0:2c7:d7e:4c6c with SMTP id d17-20020a056000115100b002c70d7e4c6cmr7647408wrx.44.1677262139311; Fri, 24 Feb 2023 10:08:59 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id i16-20020adfefd0000000b002c552c6c8c2sm11391333wrp.87.2023.02.24.10.08.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:08:58 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B05E51FFB8; Fri, 24 Feb 2023 18:08:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Li-Wen Hsu , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Kevin Wolf , Stefan Hajnoczi , Michael Roth , Qiuhao Li , Beraldo Leal , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Cleber Rosa , Yonggang Luo , Ed Maste , Peter Maydell , Aurelien Jarno , qemu-arm@nongnu.org, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Bastian Koppelmann , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Alexander Bulekov , Hanna Reitz , Bandan Das , Markus Armbruster , Darren Kenny , Wainer dos Santos Moschetta , Pavel Dovgalyuk Subject: [PATCH 1/7] configure: expose the direct container command Date: Fri, 24 Feb 2023 18:08:51 +0000 Message-Id: <20230224180857.1050220-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224180857.1050220-1-alex.bennee@linaro.org> References: <20230224180857.1050220-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org In the process of migrating away from using docker.py to build our containers we need to expose the command to the build environment. The script is still a useful way to probe which command works though. Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index cf6db3d551..b6a1cebad9 100755 --- a/configure +++ b/configure @@ -1744,6 +1744,7 @@ fi # functions to probe cross compilers container="no" +runc="" if test $use_containers = "yes" && (has "docker" || has "podman"); then case $($python "$source_path"/tests/docker/docker.py probe) in *docker) container=docker ;; @@ -1752,6 +1753,7 @@ if test $use_containers = "yes" && (has "docker" || has "podman"); then esac if test "$container" != "no"; then docker_py="$python $source_path/tests/docker/docker.py --engine $container" + runc=$($python "$source_path"/tests/docker/docker.py probe) fi fi @@ -2351,6 +2353,7 @@ fi if test "$container" != no; then echo "ENGINE=$container" >> $config_host_mak + echo "RUNC=$runc" >> $config_host_mak fi echo "ROMS=$roms" >> $config_host_mak echo "MAKE=$make" >> $config_host_mak From patchwork Fri Feb 24 18:08:52 2023 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: 656262 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1043658wrb; Fri, 24 Feb 2023 10:10:42 -0800 (PST) X-Google-Smtp-Source: AK7set96A+k58k0GNo5l7sH8d3qnM+ouu/knnXQh85775igGwMMe0CMluN9S7wKYgsMtHM5IHqRC X-Received: by 2002:a05:6214:300f:b0:56e:9298:7a1a with SMTP id ke15-20020a056214300f00b0056e92987a1amr957843qvb.9.1677262242470; Fri, 24 Feb 2023 10:10:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677262242; cv=none; d=google.com; s=arc-20160816; b=eeacwNF4mwq8O1PsQdvTagVtaNwWBDf1Gs7ttxv/E8BHKZk04a2mNdVnpolHLwjLww lkiCKsjp6x4wqSUczcgtnY6AVk0rAYjvTg1TuTZ4Sji6XpSWgGmWRwoxtcn3MzBJ5D9E OK62qd+BL7gJf/9czWQtD834CkDFxx/mIVQCM9s2/XMYK+v4nrt0U4YeULqZR5DxVwu+ R7sIaC4AfvcW+0X8X6TaysWWeGY4F5bXojyN5NLywC3Cy6RBnF1qKatFOFSTzwEviPjg 8Qetlj4R0Fy9zW0g9whAnKqVgQVoVsa0MmZpo7mcwhClSLkvajkEkwlp5obN2l/OUdEU CNFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=AFFga98mTvSLpaYsI5+GZ2pTSutF+AdzB9RPsTcdBPA=; b=TDlBfuasZpVGSlk6idYfq+akn6dD6VHGbe/XU4KuKyUx9jK8vPcpVsOXhblApXsljB Y+MQeyb79w/wG/w2biH1t4zLuA6Fd09+a8iWuR4qDFRHD+OpEk58O1SsxPQlQMtxaX2Y pAKiuzBR493qlAtOE0aOutQ4n8Wq1D6RQmNoEwoJRJlb6kExlX69Y0/eki6Tl9z7UvgT fl3L8VxNydg0ORnMkPl7spiscfn7njbdZty7Z2/ZXirx0ClWNoyt6oYewiVa7onHG22n u3vwOEoeMMNSyQ7AWL/3XlyaH48F5powIch8lmUvCKspVCC7mAy4v5gasRYyt5CgekhY n4Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wMoORneg; 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=pass (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 x3-20020a0ce243000000b0056ebe4b500csi6155613qvl.482.2023.02.24.10.10.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Feb 2023 10:10:42 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=wMoORneg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVcVF-00056J-T6; Fri, 24 Feb 2023 13:09:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVcVD-000543-TE for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:03 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVcVB-0004p1-3Q for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:03 -0500 Received: by mail-wm1-x32d.google.com with SMTP id m25-20020a7bcb99000000b003e7842b75f2so8752wmi.3 for ; Fri, 24 Feb 2023 10:09:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AFFga98mTvSLpaYsI5+GZ2pTSutF+AdzB9RPsTcdBPA=; b=wMoORnegUQjEk2IjUZqiUrD7tyYazQa+DKsPXxSdgn9jU8FsdP4hEOHCgTKttfRVdZ 3iq7Y9IB57jaGXAP2fTV4sHA04OagDhhik9wMIoNeVd/q9tNb9Px0Ho/J9eCFF3POq62 8k4h+31PMOGW0S+B/3/QHXLJaq/Nqbo84Xg3bpyYDYBfXgvM94A16jH5kH9+io3lBaae PAlUzrtyjgkH74jh9NojkrFyD9wdF50FjAUgHkJlJDo6WKCyyQJERFNSfWazWuoSP8gt XuApMmJGc9ZUWaa8Wi8r4tYwj/S38omRJ/Ia35E6qO5q8TQZIxlf98YqAaKjPZiaUViG /l6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AFFga98mTvSLpaYsI5+GZ2pTSutF+AdzB9RPsTcdBPA=; b=7zkdKFqPg9d5zlVzvRA0yfjc59hwHzvGl93SJmqEItyxvgriw+fekUzBAZN5FHBTMO kTngPBOSgKjeYHh/lG2500W2C1eHsLPByInIG/zkOEhtqmJrw9lFFGLGC8cfWheC3TwB Hg9f98rOoLviS6zfgl62G+R6a04m7CoqMOvCpLRuTVF2TtEB4TdCft52Dkm8Jr+Zcg4o 9DdMevAEeCSVNnV3FY5IuGPALmxbHOgUzsH6U5Ty78AXbsGamM7KtJA1egg0EUjEVRo1 1aprqmFJG2Ao1fGAQC+a1a2Q2gMuj/IaFfIW3m8J7ac7ysgQmdOhdeQfGCnFpf57ctDv 5H4Q== X-Gm-Message-State: AO0yUKWUVRa1R/NnpnVPp/6hvKgilYgLb+JhumTtNTGdwakOWW9ayb4b Yqy5pyepQfOIriN30EqMK1OXQw== X-Received: by 2002:a05:600c:1895:b0:3df:1673:90b6 with SMTP id x21-20020a05600c189500b003df167390b6mr12652229wmp.39.1677262139675; Fri, 24 Feb 2023 10:08:59 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id c11-20020a7bc00b000000b003e91b9a92c9sm3864655wmb.24.2023.02.24.10.08.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:08:59 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C71B01FFBA; Fri, 24 Feb 2023 18:08:57 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Li-Wen Hsu , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Kevin Wolf , Stefan Hajnoczi , Michael Roth , Qiuhao Li , Beraldo Leal , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Cleber Rosa , Yonggang Luo , Ed Maste , Peter Maydell , Aurelien Jarno , qemu-arm@nongnu.org, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Bastian Koppelmann , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Alexander Bulekov , Hanna Reitz , Bandan Das , Markus Armbruster , Darren Kenny , Wainer dos Santos Moschetta , Pavel Dovgalyuk Subject: [PATCH 2/7] tests/dockerfiles: unify debian-toolchain references Date: Fri, 24 Feb 2023 18:08:52 +0000 Message-Id: <20230224180857.1050220-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224180857.1050220-1-alex.bennee@linaro.org> References: <20230224180857.1050220-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We use the debian release number elsewhere so fix it for consistency along with the broken comment. Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/debian-toolchain.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docker/dockerfiles/debian-toolchain.docker b/tests/docker/dockerfiles/debian-toolchain.docker index 6c73408b34..dc9545857f 100644 --- a/tests/docker/dockerfiles/debian-toolchain.docker +++ b/tests/docker/dockerfiles/debian-toolchain.docker @@ -30,7 +30,7 @@ ADD build-toolchain.sh /root/build-toolchain.sh RUN cd /root && ./build-toolchain.sh # Throw away the extra toolchain build deps, the downloaded source, -# and the build trees by restoring the original debian10 image, +# and the build trees by restoring the original image, # then copying the built toolchain from stage 0. -FROM docker.io/library/debian:bullseye-slim +FROM docker.io/library/debian:11-slim COPY --from=0 /usr/local /usr/local From patchwork Fri Feb 24 18:08:53 2023 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: 656264 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1043831wrb; Fri, 24 Feb 2023 10:11:01 -0800 (PST) X-Google-Smtp-Source: AK7set+qvA/hq7sES/kPGY4OioXx5t5yyP1pEZH1YJZGs3vhMiAXdz9ZvuLDu9CWuZY0u5LcsJ1R X-Received: by 2002:ad4:5aec:0:b0:56b:fe6a:df87 with SMTP id c12-20020ad45aec000000b0056bfe6adf87mr32547539qvh.52.1677262261697; Fri, 24 Feb 2023 10:11:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677262261; cv=none; d=google.com; s=arc-20160816; b=RN4DWMOBhExA3wnvgC0aJtyqF6j5t7GfD1VzM/bS8wEQnxA1Rtht8EYh3fr217vxzA nIcZmvHE3UNy5K3rHTd7IH+kBnwWWaNgwdQcZ1Ll8rWMUuJ0wj4q0qWNQe9c7WJcWNYf rYzICsqZMbEVbLfeYmf3ngM6VVGwmWw5LIcaeXbw93U9Uw9DkPEW9guQ52ONjSGQpyS0 64vEUSlB3R2bZ8oS11AWjvyKB+++NKOR2KcQEje5CUxnYISF50W2sLAvuIebTUQMyFv/ nMa1PjphxhvpXApHX9FeVKa3j0oRT3CBchAC6CXuOi663uJsWrLHS21h+hFums2+ROD8 ZVoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=2ANHfuSMn4snK43mAsAsIh/k1hw6kSe61QbX5WHSgis=; b=k5O1IbN3Up8nsiMMxGBITT6puCg+gbsST7jz9ScSDoMlYBrOvZbdV/Pxjq1DW3j7wu ZMlAUMf76SaGMRk9JL9ZEooALl1OGYBUYI30TUUQXO3na3Kubkqb15rPembmYawbZcYX kgTth7Xy13KaK6/0zA2vI49RHOSg93P6ixBKNL7k3/D4V3roRzgbnF8ntx0q1yMw/zt5 w2mECW4JA7vJMrWr44ZtyJ6qCcmJ7LASP6pGP96W1R4FgUlMpueY1Qh/+gjJuNLNFPZp JqXYTvfZTJCGti8yW800t/3v4MpU5w7mcp2bWB6lCJZmn8dE/7VszB35a3Tzm1r/7+qP 90ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FaJ3WWv9; 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=pass (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 r4-20020a0ccc04000000b0056ed7380a52si4867713qvk.379.2023.02.24.10.11.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Feb 2023 10:11:01 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=FaJ3WWv9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVcVL-0005BK-Cm; Fri, 24 Feb 2023 13:09:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVcVG-00056e-5f for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:06 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVcVB-0004sb-RY for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:05 -0500 Received: by mail-wr1-x42f.google.com with SMTP id bw19so4167072wrb.13 for ; Fri, 24 Feb 2023 10:09:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2ANHfuSMn4snK43mAsAsIh/k1hw6kSe61QbX5WHSgis=; b=FaJ3WWv90mQ+PzJ+W4qTz7MiT28uf7SDrtIfJ8stMQP+cyRCSzM/daB4f+Ot30mfwi lASU38cZ5Se2etOk5kIftWCLs3jBgakAx4jxCxnh8vLFo6VtHmBa1U/fbVBXtZWHaO11 kRUQjxKbdmAUqkgG/VTs3ir6Uhrr67mR1SyKH/vnIuD64j7+tSDF9FeRKw9JvMK8h1o3 LJZsuXGQgAdBa4mxPl8JkWMPXnHmy8gQGzGL1Xj1i54H71EBAhUHwHExclwWqX7rQWJx dIubq3tbWg3t8MHfP7Lx74h2yCAKXK5lYOELAhzuKoXgietKBKj9qpLxD1uLP4x2JYqU lZNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2ANHfuSMn4snK43mAsAsIh/k1hw6kSe61QbX5WHSgis=; b=Uwom2Ot3H//e6LrFaHT/A3nHFyFcAC9Nyg4kZcYuJHIHZw5uaV7OxNu7N+Kztf+m0w xKqpND7lPFYtJxU2lOcW1cy3qsCLwlBbtR92XdvD1oVg0BSdb0UOXze3Z4W4/9F6qsvf tZJcWffzBt1he30MHTGO2zuNTDPvXQg2XVQcwCBP5Ld0fufpTTXCKfHBOxfHIKraRhNc X5ksOBR6IhPT/xbafG+D7c9fbTKIRPuNOWfTm4BYz6zUxMn1/biN42Azmws27AYtqlkG xR1Y1LEVIEPqGm4PfYxv4GSxwooIvPFBcBStEV2YTWIi5HKm47IHA9jIvMAk6ymkczfL 6pww== X-Gm-Message-State: AO0yUKVB09ea8uzUCg9e6UR1Ra0p/iVdw//mi8DUmIfBN9d6ZI61aGMn esv8wLwMAkIHiiru44CX7PPAYA== X-Received: by 2002:adf:f6c5:0:b0:2c7:17b8:575b with SMTP id y5-20020adff6c5000000b002c717b8575bmr4070386wrp.46.1677262140147; Fri, 24 Feb 2023 10:09:00 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p14-20020a5d4e0e000000b002c5a790e959sm16196146wrt.19.2023.02.24.10.08.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:08:59 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1D6591FFBB; Fri, 24 Feb 2023 18:08:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Li-Wen Hsu , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Kevin Wolf , Stefan Hajnoczi , Michael Roth , Qiuhao Li , Beraldo Leal , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Cleber Rosa , Yonggang Luo , Ed Maste , Peter Maydell , Aurelien Jarno , qemu-arm@nongnu.org, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Bastian Koppelmann , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Alexander Bulekov , Hanna Reitz , Bandan Das , Markus Armbruster , Darren Kenny , Wainer dos Santos Moschetta , Pavel Dovgalyuk Subject: [PATCH 3/7] tests/lcitool: append user setting stanza to dockerfiles Date: Fri, 24 Feb 2023 18:08:53 +0000 Message-Id: <20230224180857.1050220-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224180857.1050220-1-alex.bennee@linaro.org> References: <20230224180857.1050220-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org For the cross-compilation use-case it is important to add the host user to the dockerfile so we can map them to the docker environment when cross-building files. Signed-off-by: Alex Bennée --- .gitlab-ci.d/cirrus/freebsd-12.vars | 5 +++++ .gitlab-ci.d/cirrus/freebsd-13.vars | 5 +++++ .gitlab-ci.d/cirrus/macos-12.vars | 5 +++++ tests/docker/dockerfiles/alpine.docker | 5 +++++ tests/docker/dockerfiles/centos8.docker | 5 +++++ tests/docker/dockerfiles/debian-amd64-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-amd64.docker | 5 +++++ tests/docker/dockerfiles/debian-arm64-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-armel-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-armhf-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-mips64el-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-mipsel-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-ppc64el-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-s390x-cross.docker | 5 +++++ tests/docker/dockerfiles/fedora-win32-cross.docker | 5 +++++ tests/docker/dockerfiles/fedora-win64-cross.docker | 5 +++++ tests/docker/dockerfiles/fedora.docker | 5 +++++ tests/docker/dockerfiles/opensuse-leap.docker | 5 +++++ tests/docker/dockerfiles/ubuntu2004.docker | 5 +++++ tests/docker/dockerfiles/ubuntu2204.docker | 5 +++++ tests/lcitool/refresh | 11 ++++++++++- 21 files changed, 110 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.d/cirrus/freebsd-12.vars b/.gitlab-ci.d/cirrus/freebsd-12.vars index 44d8a2a511..0bff53be44 100644 --- a/.gitlab-ci.d/cirrus/freebsd-12.vars +++ b/.gitlab-ci.d/cirrus/freebsd-12.vars @@ -14,3 +14,8 @@ PIP3='/usr/local/bin/pip-3.8' PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/freebsd-13.vars index 7622c849b2..235d08a5ee 100644 --- a/.gitlab-ci.d/cirrus/freebsd-13.vars +++ b/.gitlab-ci.d/cirrus/freebsd-13.vars @@ -14,3 +14,8 @@ PIP3='/usr/local/bin/pip-3.8' PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/.gitlab-ci.d/cirrus/macos-12.vars b/.gitlab-ci.d/cirrus/macos-12.vars index da6aa6469b..599e210707 100644 --- a/.gitlab-ci.d/cirrus/macos-12.vars +++ b/.gitlab-ci.d/cirrus/macos-12.vars @@ -14,3 +14,8 @@ PIP3='/opt/homebrew/bin/pip3' PKGS='bash bc bison bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo json-c libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson ncurses nettle ninja pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy socat sparse spice-protocol tesseract usbredir vde vte3 zlib zstd' PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme' PYTHON='/opt/homebrew/bin/python3' +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker index 56cf14e553..7b82dec8e5 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -124,3 +124,8 @@ ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" ENV NINJA "/usr/bin/ninja" ENV PYTHON "/usr/bin/python3" +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker index 1291ae1b04..2cca33e730 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -134,3 +134,8 @@ ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" ENV NINJA "/usr/bin/ninja" ENV PYTHON "/usr/bin/python3" +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/debian-amd64-cross.docker b/tests/docker/dockerfiles/debian-amd64-cross.docker index 856db95100..50a2b34c62 100644 --- a/tests/docker/dockerfiles/debian-amd64-cross.docker +++ b/tests/docker/dockerfiles/debian-amd64-cross.docker @@ -169,3 +169,8 @@ ENV ABI "x86_64-linux-gnu" ENV MESON_OPTS "--cross-file=x86_64-linux-gnu" ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-linux-gnu- ENV DEF_TARGET_LIST x86_64-softmmu,x86_64-linux-user,i386-softmmu,i386-linux-user +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/dockerfiles/debian-amd64.docker index e3dba71ad5..d77e3d169a 100644 --- a/tests/docker/dockerfiles/debian-amd64.docker +++ b/tests/docker/dockerfiles/debian-amd64.docker @@ -155,3 +155,8 @@ RUN git clone https://github.com/luigirizzo/netmap.git /usr/src/netmap RUN cd /usr/src/netmap && git checkout v11.3 RUN cd /usr/src/netmap/LINUX && ./configure --no-drivers --no-apps --kernel-dir=$(ls -d /usr/src/linux-headers-*-amd64) && make install ENV QEMU_CONFIGURE_OPTS --enable-netmap +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker index b00e9e9bcf..5288435da1 100644 --- a/tests/docker/dockerfiles/debian-arm64-cross.docker +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker @@ -168,3 +168,8 @@ ENV ABI "aarch64-linux-gnu" ENV MESON_OPTS "--cross-file=aarch64-linux-gnu" ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu- ENV DEF_TARGET_LIST aarch64-softmmu,aarch64-linux-user +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker index fb1129f256..95ce5bbfd0 100644 --- a/tests/docker/dockerfiles/debian-armel-cross.docker +++ b/tests/docker/dockerfiles/debian-armel-cross.docker @@ -167,3 +167,8 @@ ENV ABI "arm-linux-gnueabi" ENV MESON_OPTS "--cross-file=arm-linux-gnueabi" ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi- ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user,armeb-linux-user +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker index 7a2b864a38..20f6074d5e 100644 --- a/tests/docker/dockerfiles/debian-armhf-cross.docker +++ b/tests/docker/dockerfiles/debian-armhf-cross.docker @@ -168,3 +168,8 @@ ENV ABI "arm-linux-gnueabihf" ENV MESON_OPTS "--cross-file=arm-linux-gnueabihf" ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf- ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker index 5a3340e964..15f8568cb1 100644 --- a/tests/docker/dockerfiles/debian-mips64el-cross.docker +++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker @@ -165,3 +165,8 @@ ENV ABI "mips64el-linux-gnuabi64" ENV MESON_OPTS "--cross-file=mips64el-linux-gnuabi64" ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips64el-linux-gnuabi64- ENV DEF_TARGET_LIST mips64el-softmmu,mips64el-linux-user +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker index 422fdebe8f..cc6a44dbe7 100644 --- a/tests/docker/dockerfiles/debian-mipsel-cross.docker +++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker @@ -165,3 +165,8 @@ ENV ABI "mipsel-linux-gnu" ENV MESON_OPTS "--cross-file=mipsel-linux-gnu" ENV QEMU_CONFIGURE_OPTS --cross-prefix=mipsel-linux-gnu- ENV DEF_TARGET_LIST mipsel-softmmu,mipsel-linux-user +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker index 78d7ae6211..7ff1e44b88 100644 --- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker +++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker @@ -167,3 +167,8 @@ ENV ABI "powerpc64le-linux-gnu" ENV MESON_OPTS "--cross-file=powerpc64le-linux-gnu" ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu- ENV DEF_TARGET_LIST ppc64-softmmu,ppc64-linux-user +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker index d06ea3605a..d084f34cb1 100644 --- a/tests/docker/dockerfiles/debian-s390x-cross.docker +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker @@ -166,3 +166,8 @@ ENV ABI "s390x-linux-gnu" ENV MESON_OPTS "--cross-file=s390x-linux-gnu" ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu- ENV DEF_TARGET_LIST s390x-softmmu,s390x-linux-user +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker index 21ed1c6081..87d91a6759 100644 --- a/tests/docker/dockerfiles/fedora-win32-cross.docker +++ b/tests/docker/dockerfiles/fedora-win32-cross.docker @@ -100,3 +100,8 @@ ENV ABI "i686-w64-mingw32" ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw32.meson" ENV QEMU_CONFIGURE_OPTS --cross-prefix=i686-w64-mingw32- ENV DEF_TARGET_LIST i386-softmmu +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker index 95d30e7936..877766ec6b 100644 --- a/tests/docker/dockerfiles/fedora-win64-cross.docker +++ b/tests/docker/dockerfiles/fedora-win64-cross.docker @@ -100,3 +100,8 @@ ENV ABI "x86_64-w64-mingw32" ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw64.meson" ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32- ENV DEF_TARGET_LIST x86_64-softmmu +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index 8e06d080b8..4a7a986dfd 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -146,3 +146,8 @@ ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" ENV NINJA "/usr/bin/ninja" ENV PYTHON "/usr/bin/python3" +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker index 568c1c979f..f5f8d4714d 100644 --- a/tests/docker/dockerfiles/opensuse-leap.docker +++ b/tests/docker/dockerfiles/opensuse-leap.docker @@ -137,3 +137,8 @@ ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" ENV NINJA "/usr/bin/ninja" ENV PYTHON "/usr/bin/python3" +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker index 75233064de..4d257b922b 100644 --- a/tests/docker/dockerfiles/ubuntu2004.docker +++ b/tests/docker/dockerfiles/ubuntu2004.docker @@ -146,3 +146,8 @@ ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" ENV NINJA "/usr/bin/ninja" ENV PYTHON "/usr/bin/python3" +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/docker/dockerfiles/ubuntu2204.docker b/tests/docker/dockerfiles/ubuntu2204.docker index 30b9e56793..41c2d2878e 100644 --- a/tests/docker/dockerfiles/ubuntu2204.docker +++ b/tests/docker/dockerfiles/ubuntu2204.docker @@ -145,3 +145,8 @@ ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" ENV NINJA "/usr/bin/ninja" ENV PYTHON "/usr/bin/python3" +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi \ No newline at end of file diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index cc9e34ac87..88bf33fb74 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -40,6 +40,15 @@ def atomic_write(filename, content): tmp.unlink() raise +# Optional user setting, this will always be the last thing added +# so maximise the number of layers that are cached +add_user_mapping = [ + "# As a final step configure the user (if env is defined)", + "ARG USER", + "ARG UID", + "RUN if [ \"${USER}\" ]; then \\", + " id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi" +] def generate(filename, cmd, trailer): print("Generate %s" % filename) @@ -51,9 +60,9 @@ def generate(filename, cmd, trailer): content = lcitool.stdout.decode("utf8") if trailer is not None: content += trailer + content += "\n".join(add_user_mapping) atomic_write(filename, content) - def generate_dockerfile(host, target, cross=None, trailer=None): filename = Path(src_dir, "tests", "docker", "dockerfiles", host + ".docker") cmd = lcitool_cmd + ["dockerfile"] From patchwork Fri Feb 24 18:08:54 2023 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: 656261 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1043634wrb; Fri, 24 Feb 2023 10:10:38 -0800 (PST) X-Google-Smtp-Source: AK7set8HMgR/oOUeDSrzzY9jmrcZ0Ql4ntwTCEiA/+T3XTw7/HbvMWnUVX0IXl324rEJEUW2YCIG X-Received: by 2002:a05:6214:260e:b0:56e:fbb8:a9c2 with SMTP id gu14-20020a056214260e00b0056efbb8a9c2mr29693057qvb.22.1677262238631; Fri, 24 Feb 2023 10:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677262238; cv=none; d=google.com; s=arc-20160816; b=cBLW74kmoqY/HBxQlYItdQA32AtoWy7Y9oe8XNo7P3KhVVYpbwUSZPd7nDJCy4cZa2 1Vf6ZhyHIeJKvPE+8hj7rWS5vQNwr5ghvwQVTltZovjx4R9DWrVPkovAmkFIcPBcUuSL QxpCF0eVTiSUe+lQvUp+kWd4b78nc1nKTWdcwshR3oPzdnT0Jb5Qy3UG+sjrtdiASHuX N75+u2AZoMRf+KqL8RDmOCdzFWNwWzsEtGez+CtZKOwHLDB5bK80hEmbFInCCLp7Zs7f AOrNr2ETh6LVkDkXP6kpiTK4OruwEowkn4Vn8VMm/d9sYkzdMP3054iBUUVMlt4D9bO/ 00FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=gidcl3/4SFlggIKxiWLtt6WSOzuIYVu2Aj2ohhG4Ekk=; b=abrPSagQzREBBYwREVeaPe7tlJvnthdidcH4mR5HXuJs+s5qVXu9QQpcgv8vSmCkNP 5OLvXYytKTq1j/gaOK23lGAkgQf+rvzS5Pf2bxcnc++m9ggFlsOWcvmAKLacccL2tWNJ 5bIeJmLZEgAnaZZatOWSAvlI2goNR1UJV9j1d+fVKb1jKJ9YRqy5giLSqeAFAW79fdVZ +3KzhOWzYw/Z+dpFL35ZZM9nRZ3l0wQcp2hn6cXUZRy4+wvMb2wVRy7pcd1Vpos2w0VV CCXp+I2zFc41Q8p6as5awud9GC+Lda00+AZ8MQomG6OLHTsMedQgLNuZajDrZpcOQHTp pbEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MOYCYCnY; 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=pass (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 f6-20020a0ccc86000000b0056ebe03973fsi12963516qvl.314.2023.02.24.10.10.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Feb 2023 10:10:38 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=MOYCYCnY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVcVN-0005Cb-39; Fri, 24 Feb 2023 13:09:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVcVI-00058p-8t for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:10 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVcVC-0004wl-KS for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:08 -0500 Received: by mail-wm1-x32a.google.com with SMTP id ay29-20020a05600c1e1d00b003e9f4c2b623so2770063wmb.3 for ; Fri, 24 Feb 2023 10:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gidcl3/4SFlggIKxiWLtt6WSOzuIYVu2Aj2ohhG4Ekk=; b=MOYCYCnYn2RIpptry41w2jdUoXEg8TZEDF5JKdCksLs5vPJTgcMTogqLfiFF33753B 82u97ImICwKBiZg7d0hI6U97O4kNziv3tXNCs03pTgkTYJw9PhQ1U/SBAeggWPhND7B+ 79s5nP5etqe+h/f7AR9SRQRD38OPfkK1UbQ3xb3hUrfAgpGlVngRj6QvuJCu+pxVAmNz BPD7Fpz5lQRNcDuON440apBQ52voEKMVbTIRYdabGohnwwIR/LqhIwhoTDSWvqQwibZS LqPka99V4bKU7mnKOHQ+wDiPkZ58Iwkzcbm0kMeNf4IHeahaPsg62f3AfnOudvpOWeBA edGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gidcl3/4SFlggIKxiWLtt6WSOzuIYVu2Aj2ohhG4Ekk=; b=YVvQAZAqRsL9WYZOxpk3+haGPv01sGHpmyGwneYOkBaHIYL3QMgYzP3vxkU1P6AUG+ gNVP6BU32tmOiB9thTYdNlXfVQO9vfmcWO3TU4hwZl6KNkIqeS1PZmNMDn9WHJcyje/g RmIkShBgE+ASW7YHU40xagD4/ilZRqscssJhk48f8uuA7DzYz3HB9Lb9knKNdyyHV2LK 3pam4XX4Ol0bnNCGf4s6LhDBhU1ZK1uNCSg1JV2CBz7/+IVIUmdsW7jvtfkzblfmtmEZ sEONeaDCmz6Fm923KtsbR8Dwz/bl6jLpXpWkJtCV/77ljn8G9hCklLbgZr1m/Clp2bqb 58CQ== X-Gm-Message-State: AO0yUKXO/aWWLILYLWyaygB+n/Spq3AVW5fn3Zb9KZzaMirnHiK+kRGz eImvC9gWGKebX5jwgg2OfdmyXw== X-Received: by 2002:a05:600c:4929:b0:3dc:d5c:76d9 with SMTP id f41-20020a05600c492900b003dc0d5c76d9mr12700243wmp.0.1677262141071; Fri, 24 Feb 2023 10:09:01 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n31-20020a05600c3b9f00b003e8dcc67bdesm4176926wms.30.2023.02.24.10.08.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:08:59 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 61E0D1FFBC; Fri, 24 Feb 2023 18:08:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Li-Wen Hsu , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Kevin Wolf , Stefan Hajnoczi , Michael Roth , Qiuhao Li , Beraldo Leal , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Cleber Rosa , Yonggang Luo , Ed Maste , Peter Maydell , Aurelien Jarno , qemu-arm@nongnu.org, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Bastian Koppelmann , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Alexander Bulekov , Hanna Reitz , Bandan Das , Markus Armbruster , Darren Kenny , Wainer dos Santos Moschetta , Pavel Dovgalyuk Subject: [PATCH 4/7] tests/docker: add USER stanzas to non-lci images Date: Fri, 24 Feb 2023 18:08:54 +0000 Message-Id: <20230224180857.1050220-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224180857.1050220-1-alex.bennee@linaro.org> References: <20230224180857.1050220-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These are flat but not generated by lcitool so we need to manually update them with the `useradd` stanza. Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/debian-all-test-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-alpha-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-hexagon-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-hppa-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-loongarch-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-m68k-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-mips-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-mips64-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-native.docker | 5 +++++ tests/docker/dockerfiles/debian-powerpc-test-cross.docker | 6 +++++- tests/docker/dockerfiles/debian-riscv64-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-riscv64-test-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-sh4-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-sparc64-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-toolchain.docker | 5 +++++ tests/docker/dockerfiles/debian-tricore-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-xtensa-cross.docker | 5 +++++ tests/docker/dockerfiles/fedora-cris-cross.docker | 5 +++++ tests/docker/dockerfiles/fedora-i386-cross.docker | 5 +++++ tests/docker/dockerfiles/python.docker | 5 +++++ 20 files changed, 100 insertions(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/docker/dockerfiles/debian-all-test-cross.docker index 8dc5e1b5de..981e9bdc7b 100644 --- a/tests/docker/dockerfiles/debian-all-test-cross.docker +++ b/tests/docker/dockerfiles/debian-all-test-cross.docker @@ -61,3 +61,8 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \ ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools ENV DEF_TARGET_LIST aarch64-linux-user,alpha-linux-user,arm-linux-user,hppa-linux-user,i386-linux-user,m68k-linux-user,mips-linux-user,mips64-linux-user,mips64el-linux-user,mipsel-linux-user,ppc-linux-user,ppc64-linux-user,ppc64le-linux-user,riscv64-linux-user,s390x-linux-user,sh4-linux-user,sparc64-linux-user +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-alpha-cross.docker b/tests/docker/dockerfiles/debian-alpha-cross.docker index 4eeb43c78a..7fa7bf1bde 100644 --- a/tests/docker/dockerfiles/debian-alpha-cross.docker +++ b/tests/docker/dockerfiles/debian-alpha-cross.docker @@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ eatmydata apt-get install --no-install-recommends -y \ gcc-alpha-linux-gnu \ libc6.1-dev-alpha-cross +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/dockerfiles/debian-hexagon-cross.docker index 8a0d748343..5308ccb8fe 100644 --- a/tests/docker/dockerfiles/debian-hexagon-cross.docker +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker @@ -33,3 +33,8 @@ ENV TOOLCHAIN_URL https://codelinaro.jfrog.io/artifactory/codelinaro-toolchain-f RUN curl -#SL "$TOOLCHAIN_URL" | tar -xJC "$TOOLCHAIN_INSTALL" ENV PATH $PATH:${TOOLCHAIN_INSTALL}/${TOOLCHAIN_BASENAME}/x86_64-linux-gnu/bin +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-hppa-cross.docker b/tests/docker/dockerfiles/debian-hppa-cross.docker index af1c8403d8..dd47ffdfa4 100644 --- a/tests/docker/dockerfiles/debian-hppa-cross.docker +++ b/tests/docker/dockerfiles/debian-hppa-cross.docker @@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ eatmydata apt-get install --no-install-recommends -y \ gcc-hppa-linux-gnu \ libc6-dev-hppa-cross +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-loongarch-cross.docker b/tests/docker/dockerfiles/debian-loongarch-cross.docker index a8e8e98909..9d957547b5 100644 --- a/tests/docker/dockerfiles/debian-loongarch-cross.docker +++ b/tests/docker/dockerfiles/debian-loongarch-cross.docker @@ -25,3 +25,8 @@ RUN curl -#SL https://github.com/loongson/build-tools/releases/download/2022.05. ENV PATH $PATH:/opt/cross-tools/bin ENV LD_LIBRARY_PATH /opt/cross-tools/lib:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib:$LD_LIBRARY_PATH +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-m68k-cross.docker b/tests/docker/dockerfiles/debian-m68k-cross.docker index dded71c5d2..25dd1c1e68 100644 --- a/tests/docker/dockerfiles/debian-m68k-cross.docker +++ b/tests/docker/dockerfiles/debian-m68k-cross.docker @@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ eatmydata apt-get install --no-install-recommends -y \ gcc-m68k-linux-gnu \ libc6-dev-m68k-cross +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-mips-cross.docker b/tests/docker/dockerfiles/debian-mips-cross.docker index 7b55f0f3b2..2cbc568ed1 100644 --- a/tests/docker/dockerfiles/debian-mips-cross.docker +++ b/tests/docker/dockerfiles/debian-mips-cross.docker @@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ eatmydata apt-get install --no-install-recommends -y \ gcc-mips-linux-gnu \ libc6-dev-mips-cross +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-mips64-cross.docker b/tests/docker/dockerfiles/debian-mips64-cross.docker index afcff9726f..ba965cf564 100644 --- a/tests/docker/dockerfiles/debian-mips64-cross.docker +++ b/tests/docker/dockerfiles/debian-mips64-cross.docker @@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ eatmydata apt-get install --no-install-recommends -y \ gcc-mips64-linux-gnuabi64 \ libc6-dev-mips64-cross +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-native.docker b/tests/docker/dockerfiles/debian-native.docker index 8dd033097c..abac7d7cd7 100644 --- a/tests/docker/dockerfiles/debian-native.docker +++ b/tests/docker/dockerfiles/debian-native.docker @@ -47,3 +47,8 @@ RUN apt update && \ ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS ENV DEF_TARGET_LIST "none" +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-powerpc-test-cross.docker b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker index d6b2909cc4..23779413d3 100644 --- a/tests/docker/dockerfiles/debian-powerpc-test-cross.docker +++ b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker @@ -16,4 +16,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ libc6-dev-ppc64-cross \ gcc-10-powerpc64le-linux-gnu \ libc6-dev-ppc64el-cross - +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-riscv64-cross.docker b/tests/docker/dockerfiles/debian-riscv64-cross.docker index 3daf93968a..803afb9573 100644 --- a/tests/docker/dockerfiles/debian-riscv64-cross.docker +++ b/tests/docker/dockerfiles/debian-riscv64-cross.docker @@ -50,3 +50,8 @@ RUN apt update && \ # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=riscv64-linux-gnu- ENV DEF_TARGET_LIST riscv64-softmmu,riscv64-linux-user +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-riscv64-test-cross.docker b/tests/docker/dockerfiles/debian-riscv64-test-cross.docker index e5f83a5aeb..6e631295bc 100644 --- a/tests/docker/dockerfiles/debian-riscv64-test-cross.docker +++ b/tests/docker/dockerfiles/debian-riscv64-test-cross.docker @@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ eatmydata apt-get install --no-install-recommends -y \ gcc-riscv64-linux-gnu \ libc6-dev-riscv64-cross +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-sh4-cross.docker b/tests/docker/dockerfiles/debian-sh4-cross.docker index d48ed9065f..6bd8171d33 100644 --- a/tests/docker/dockerfiles/debian-sh4-cross.docker +++ b/tests/docker/dockerfiles/debian-sh4-cross.docker @@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ eatmydata apt-get install --no-install-recommends -y \ gcc-sh4-linux-gnu \ libc6-dev-sh4-cross +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-sparc64-cross.docker b/tests/docker/dockerfiles/debian-sparc64-cross.docker index 8d3d306bc1..1ef735f223 100644 --- a/tests/docker/dockerfiles/debian-sparc64-cross.docker +++ b/tests/docker/dockerfiles/debian-sparc64-cross.docker @@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ eatmydata apt-get install --no-install-recommends -y \ gcc-sparc64-linux-gnu \ libc6-dev-sparc64-cross +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-toolchain.docker b/tests/docker/dockerfiles/debian-toolchain.docker index dc9545857f..687a97fec4 100644 --- a/tests/docker/dockerfiles/debian-toolchain.docker +++ b/tests/docker/dockerfiles/debian-toolchain.docker @@ -34,3 +34,8 @@ RUN cd /root && ./build-toolchain.sh # then copying the built toolchain from stage 0. FROM docker.io/library/debian:11-slim COPY --from=0 /usr/local /usr/local +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/dockerfiles/debian-tricore-cross.docker index 82e4576485..cfd2faf9a8 100644 --- a/tests/docker/dockerfiles/debian-tricore-cross.docker +++ b/tests/docker/dockerfiles/debian-tricore-cross.docker @@ -41,3 +41,8 @@ RUN curl -#SL https://github.com/bkoppelmann/package_940/releases/download/trico # This image can only build a very minimal QEMU as well as the tests ENV DEF_TARGET_LIST tricore-softmmu ENV QEMU_CONFIGURE_OPTS --disable-user --disable-tools --disable-fdt +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/debian-xtensa-cross.docker b/tests/docker/dockerfiles/debian-xtensa-cross.docker index 2f11b3b7bc..082b50da19 100644 --- a/tests/docker/dockerfiles/debian-xtensa-cross.docker +++ b/tests/docker/dockerfiles/debian-xtensa-cross.docker @@ -27,3 +27,8 @@ RUN for cpu in $CPU_LIST; do \ done ENV PATH $PATH:/opt/$TOOLCHAIN_RELEASE/xtensa-dc232b-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-dc233c-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-de233_fpu-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-dsp3400-elf/bin +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/fedora-cris-cross.docker b/tests/docker/dockerfiles/fedora-cris-cross.docker index 91c373fdd3..f2899af410 100644 --- a/tests/docker/dockerfiles/fedora-cris-cross.docker +++ b/tests/docker/dockerfiles/fedora-cris-cross.docker @@ -6,3 +6,8 @@ FROM registry.fedoraproject.org/fedora:33 ENV PACKAGES gcc-cris-linux-gnu RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker index f58b64dc3e..14c1fb2c93 100644 --- a/tests/docker/dockerfiles/fedora-i386-cross.docker +++ b/tests/docker/dockerfiles/fedora-i386-cross.docker @@ -32,3 +32,8 @@ ENV PKG_CONFIG_LIBDIR /usr/lib/pkgconfig RUN dnf update -y && dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/docker/dockerfiles/python.docker b/tests/docker/dockerfiles/python.docker index 56d88417df..708ebbed75 100644 --- a/tests/docker/dockerfiles/python.docker +++ b/tests/docker/dockerfiles/python.docker @@ -16,3 +16,8 @@ ENV PACKAGES \ RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt +# As a final step configure the user (if env is defined) +ARG USER +ARG UID +RUN if [ "${USER}" ]; then \ + id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi From patchwork Fri Feb 24 18:08:55 2023 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: 656265 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1043854wrb; Fri, 24 Feb 2023 10:11:05 -0800 (PST) X-Google-Smtp-Source: AK7set+76F0IDq/Aq1YtUfeMPq9jm/mBhck1KwLYia1L03vj0TV5cKvWKIGHBrnnUQGNPGVjXMdS X-Received: by 2002:a05:6102:390f:b0:3ef:75d3:c764 with SMTP id e15-20020a056102390f00b003ef75d3c764mr14867131vsu.5.1677262264936; Fri, 24 Feb 2023 10:11:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677262264; cv=none; d=google.com; s=arc-20160816; b=P5gUZ2QF8i9n501x1W3JRYyG3SH81GdgTGTibGaVTtMcmF6CulKzK0pu2xfPrWrJW/ DarNHPKhPMA8fC1asY2TMD4aP6Hc7ktmbCVl03Yk/ZIDBAYkYYGPu6FRgNOrFNFDHMNJ nsesGTwBT7dE1RQuSvk5tfwhXJAUChPuZnlvUX5r8gtXmdAMOvSCWrhdvYQ3vf0sOobU iQ9QAm0oCEUK6iPCGSflD5HA5PuUvq6IHZZGmAyGMGLghAcxtFKoge/3SivHRsmIDnVn GBevVUrBoewRv1sT61XCo7HNFAfMaEQKaRm24ppnH26Rq0WWQrK9eVmXL4W3UnRMZgdb PU7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=bChR6NeE4/G3GIsj80HSMKzwjWOp8TUdcvSDXl1e9qI=; b=W9q3kn9Vi0KtTQNo0cLB2xl4+iES8VpTfbjPpAlCa98lsZeyB56XYOaAF3SlI81pO0 1phBZitUf9JFnIm3/rPWOBBmVR+2DqY/0TU8jjeBwg7f9WquYHzQxKvhNOmXSONMHdXL pe/VgdBvSTL9vaBEg5DVPHF2ifoGmSs415Ro2t5NSKfOGI0zDW6kAoO81EkpoV6q/CFP 0NKlEG1fXiLu1KTTiv/PKJvpQgdn89WejnHDi6aC64uFHT3sUNn8pe+UA59FsiOqZyur P83PhOs5ZhKKXBL2YmCV2N+8raes2QCoY1ezn1wjsOXguje3QAr88HEmjZlTrR8ZXA/I cpuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PqYMWldI; 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=pass (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 f25-20020ab032d9000000b00630ed0edcebsi6059769uao.68.2023.02.24.10.11.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Feb 2023 10:11:04 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=PqYMWldI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVcVP-0005EV-45; Fri, 24 Feb 2023 13:09:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVcVH-00058n-FL for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:10 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVcVC-0004ug-L4 for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:07 -0500 Received: by mail-wm1-x329.google.com with SMTP id l2-20020a05600c1d0200b003e1f6dff952so2801928wms.1 for ; Fri, 24 Feb 2023 10:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bChR6NeE4/G3GIsj80HSMKzwjWOp8TUdcvSDXl1e9qI=; b=PqYMWldIf2cMM4eZWJobja1KPJiTYKwjVrj3geFCKTbiZPJWgGAmcLXmkgEnTwCYaQ jHe9DoGQoaS33d85kdF7PoGxY1accPbvnBH/2imu8Ps/wTk0SObs45KjS6SCYUdzuhLh zlVVPfY2YOc4d1iCs+XRtiGC2amQAYubquae7iTa7fDV48hZNn0j6oH8gJ9+J3e/+s5Y JNUgTCo7Q4F+MJ/ausppOL1FViqYp7MVXqWyha15hI0xY6scTOzUs1L2hswhDOxm6g9j Posxk0TJYWO0CstqUE+357a/9DWJYUayUha63ADdaIZOkDAsE3v69f5bRqaOkvfRibJi nncg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bChR6NeE4/G3GIsj80HSMKzwjWOp8TUdcvSDXl1e9qI=; b=gSrqzjCiK7RxQ9nXoSkHEV5Xhw46T+kMkt7+gbJlDHUIXW4Cq33z0ONrS7ylxEQJJy aiNuYxkQGY0LEhUYw8/LAv4pbZOCEj5hEGKPNANvdcXRPUGw22NfaeePHeobx3DLBerC q7x2G9nzzrGjbYOxDjDrUJJLwkGlkzRzauPdVXXemTQoIFj15SdW0T70wqnTqUvNpLpa u+2QDUmQkKl++ws86X82BqK35UkWN7ns9KMeNMgjUoG+Ewsfi35BdS7+vS6rzlq3LAQW TFYfIAp3ClWOqDLKf6J8nNjtpy/n8U4STBpFuZaPnm8vBZZsRK/MsqJTFx9uopD3eahw foQA== X-Gm-Message-State: AO0yUKWUxOq4PHsTMCEhU0WXH+PvSwW9kNs8At/YyKzi2m8JN5HOtkWy +L6MFHxfOcQqm7veCVQL8TcWGg== X-Received: by 2002:a05:600c:3d9b:b0:3ea:f6c4:5f28 with SMTP id bi27-20020a05600c3d9b00b003eaf6c45f28mr3058786wmb.36.1677262140596; Fri, 24 Feb 2023 10:09:00 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id y7-20020a1c4b07000000b003daf672a616sm3580020wma.22.2023.02.24.10.08.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:08:59 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7BD5D1FFB7; Fri, 24 Feb 2023 18:08:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Li-Wen Hsu , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Kevin Wolf , Stefan Hajnoczi , Michael Roth , Qiuhao Li , Beraldo Leal , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Cleber Rosa , Yonggang Luo , Ed Maste , Peter Maydell , Aurelien Jarno , qemu-arm@nongnu.org, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Bastian Koppelmann , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Alexander Bulekov , Hanna Reitz , Bandan Das , Markus Armbruster , Darren Kenny , Wainer dos Santos Moschetta , Pavel Dovgalyuk Subject: [PATCH 5/7] tests/docker: use direct RUNC call to build containers Date: Fri, 24 Feb 2023 18:08:55 +0000 Message-Id: <20230224180857.1050220-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224180857.1050220-1-alex.bennee@linaro.org> References: <20230224180857.1050220-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We don't really need stuff from docker.py to do the build as we have everything we need with a direct call. We do rely on the dockerfiles being able to tweak the UID/name mapping as the last step. Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index bfb0dcac21..9e73ff5cf3 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -7,6 +7,8 @@ SPACE := $(NULL) # COMMA := , HOST_ARCH = $(if $(ARCH),$(ARCH),$(shell uname -m)) +USER = $(if $(NOUSER),,$(shell id -un)) +UID = $(if $(NOUSER),,$(shell id -u)) DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles ifeq ($(HOST_ARCH),x86_64) @@ -14,6 +16,7 @@ DOCKER_DEFAULT_REGISTRY := registry.gitlab.com/qemu-project/qemu endif DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),$(DOCKER_DEFAULT_REGISTRY)) +RUNC ?= docker ENGINE ?= auto DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE) @@ -35,15 +38,16 @@ docker-qemu-src: $(DOCKER_SRC_COPY) # General rule for building docker images. docker-image-%: $(DOCKER_FILES_DIR)/%.docker - $(call quiet-command,\ - $(DOCKER_SCRIPT) build -t qemu/$* -f $< \ - $(if $V,,--quiet) \ - $(if $(NOCACHE),--no-cache, \ - $(if $(DOCKER_REGISTRY),--registry $(DOCKER_REGISTRY))) \ - $(if $(NOUSER),,--add-current-user) \ - $(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\ - $(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)),\ - "BUILD","$*") + $(call quiet-command, \ + $(RUNC) build \ + $(if $V,,--quiet) \ + $(if $(NOCACHE),--no-cache, \ + $(if $(DOCKER_REGISTRY),--cache-from $(DOCKER_REGISTRY)/qemu/$*)) \ + $(if $(NOUSER),, \ + --build-arg USER=$(USER) \ + --build-arg UID=$(UID)) \ + -t qemu/$* - < $<, \ + "BUILD", $1) # Special rule for debootstraped binfmt linux-user images docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker From patchwork Fri Feb 24 18:08:56 2023 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: 656263 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1043816wrb; Fri, 24 Feb 2023 10:11:00 -0800 (PST) X-Google-Smtp-Source: AK7set8dJDB/2BsbQbLvlWbc+hNjv/0j7tw4OfhJ02hg4ajdFzvc8ia/axA6cOOn2VQmOEx1jJiE X-Received: by 2002:a05:6214:da4:b0:56e:afe2:ebca with SMTP id h4-20020a0562140da400b0056eafe2ebcamr31689861qvh.30.1677262259814; Fri, 24 Feb 2023 10:10:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677262259; cv=none; d=google.com; s=arc-20160816; b=FUaML4hoOi5m2MHpU++c/1kFt1HJrdQAB19J+DAbvPp/Xt5hNvKEo8iClUUhQkD3L/ wQeKv+QTDgw5cKslsD4+ZKufL/OdslvfZtjKjIHHvuhXpaJzt06kQQxOp1mAzafSjw9X E8uGoG8BB8tN7xRFDzmcig0YKSkk16hJcYBnwtqKJROHE1YT9FK7H5wr0rnPB4lupfz4 s4eJFPnfQyYKsjqyoFsEPKZnpUiLXg4+DBNPX28gyx6Bs8w7zVXd9p/5IlJxwh32A2kq QXKA6fbtH3T030IFbERuPt7jUsUHu0NnXNNtPhOORNQBjKElhlbGo8Yfx5vBAdZcC40O oIfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=Ymc1XvDfx+x5msJ4IYnnHFWuI1gzH/mezTScRKBnzt4=; b=WycG6EDYmzKa25Q4XCOY6wei6Yxlj7/f4u6z8srcVyOuZGYIAS/nrX/N+tW3wVJ9nN wAX8ZlIaeokjlN7CWVz9/BSW2CJLDXWvC4++LxyL8eNhPyYT5sBZDa9nCr1k3D553y++ fdPmh61BCSvURM5/P0xTav0efmYkxsDY6FXVvQI8ZJAGFjoLtsKfbXWzevNWEk8E5csU 2jyJjs92f7523D1v+M7QJ1aTny8fGllSRY1elq5BSY5ExNrEHBXT/TskbyueT57o5X7g 1rgnV+0EKc2iy/wuIiV2sGyPjmQj0SQJaQIWimHytajmIsKT6d/QIZtofLlkF6yfxPbg dptQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fk3v2jd1; 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=pass (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 a19-20020a0ce393000000b005719ee0a16asi10010057qvl.17.2023.02.24.10.10.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Feb 2023 10:10:59 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=Fk3v2jd1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVcVN-0005DO-Ts; Fri, 24 Feb 2023 13:09:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVcVK-00059s-EW for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:10 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVcVD-0004yP-7B for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:08 -0500 Received: by mail-wm1-x333.google.com with SMTP id k37so266911wms.0 for ; Fri, 24 Feb 2023 10:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ymc1XvDfx+x5msJ4IYnnHFWuI1gzH/mezTScRKBnzt4=; b=Fk3v2jd18TMXUGLnQ21lKSCQymzXYwUuq259UDIhfukKgjNxYXhjjBZgz2EpW2CdMD hTtFDkKiU8gbeVvCgNk8e0VIPsQXIt9mx63j9YG7Z9voO5mpN0VDr2SeC3r9KdnjVc/L 9yMzjwamKHvaF8BBCRX/TOqkY4dLSluLKOAbKr2/mTajNwwvjV68IbEz2serknEKJh5f 6V/QR5XHjtnCzdyOjGk8mEY1PkGR/C6zGifF1KYLiZ8cO3k8rgaP0QfbQMfNK0sFIQY7 38Rq4riNfIWLOD1cA9CrWv7vfdeTj6F0tqElj9LcCxSNRi45S4Wfv2mVKL6ZVjwdQpLF iF+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ymc1XvDfx+x5msJ4IYnnHFWuI1gzH/mezTScRKBnzt4=; b=rfvfz+px5/6T4XyFnDXHJrAp+MHeUeK6RuGSi02zLo7LqGqsi8XyKnYtuT4G91FicT xjbeSzM3mJyasr5zoNC6S+zAK0NnGBgFIOSMnaBi4rabG/7ccIH1nh1QFtvVEMjKh6Jj xrjgR3CIh9IFkdPxxivwp/E3DVAZWSb9Lw7CuEiDuZVkEku4YlCneTovrkaKcGALoC88 ++OuqMZM+U9E2L7KFDte0sy/2U2uX9wjlEFMhE/4QQTMj2fMGIjRzWVTMjC11frG/8CF V2q20wBsMblK5OG85mdqMTUGR2GY88luqx/zK3d3xuZ4viCm3G2OFCLFBYty/rKUY0Zr 8X3Q== X-Gm-Message-State: AO0yUKWNIH1WXXvLtEDxE90qKgvoo41Q2TpY8wZMOgTkCu5OoXRqx4BQ 4BseW1Wx4ObDwAVfIQBI9kcBLQ== X-Received: by 2002:a05:600c:154e:b0:3eb:29fe:f91e with SMTP id f14-20020a05600c154e00b003eb29fef91emr1737859wmg.21.1677262141521; Fri, 24 Feb 2023 10:09:01 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n31-20020a05600c3b9f00b003e8dcc67bdesm4176942wms.30.2023.02.24.10.08.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:08:59 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 958561FFBD; Fri, 24 Feb 2023 18:08:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Li-Wen Hsu , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Kevin Wolf , Stefan Hajnoczi , Michael Roth , Qiuhao Li , Beraldo Leal , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Cleber Rosa , Yonggang Luo , Ed Maste , Peter Maydell , Aurelien Jarno , qemu-arm@nongnu.org, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Bastian Koppelmann , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Alexander Bulekov , Hanna Reitz , Bandan Das , Markus Armbruster , Darren Kenny , Wainer dos Santos Moschetta , Pavel Dovgalyuk Subject: [PATCH 6/7] tests/docker: use direct RUNC call to run test jobs Date: Fri, 24 Feb 2023 18:08:56 +0000 Message-Id: <20230224180857.1050220-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224180857.1050220-1-alex.bennee@linaro.org> References: <20230224180857.1050220-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org If we build them without the script we can certainly run them without it. Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé --- tests/docker/Makefile.include | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 9e73ff5cf3..cee1b34703 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -223,8 +223,9 @@ docker-run: docker-qemu-src $(IMAGE) --executable $(EXECUTABLE), \ " COPYING $(EXECUTABLE) to $(IMAGE)")) $(call quiet-command, \ - $(DOCKER_SCRIPT) run \ - $(if $(NOUSER),,--run-as-current-user) \ + $(RUNC) run \ + --rm \ + $(if $(NOUSER),,-u $(UID)) \ --security-opt seccomp=unconfined \ $(if $(DEBUG),-ti,) \ $(if $(NETWORK),$(if $(subst $(NETWORK),,1),--net=$(NETWORK)),--net=none) \ From patchwork Fri Feb 24 18:08:57 2023 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: 656266 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1043916wrb; Fri, 24 Feb 2023 10:11:13 -0800 (PST) X-Google-Smtp-Source: AK7set/TZBr5nkmpl5QtuTHPtLswnQeJCVISeRADaqLOARREe3AvwKXBwOoBNOyHpj6YzSuL5jQn X-Received: by 2002:ac8:5b56:0:b0:3b9:b9b4:cb8d with SMTP id n22-20020ac85b56000000b003b9b9b4cb8dmr16348806qtw.11.1677262272998; Fri, 24 Feb 2023 10:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677262272; cv=none; d=google.com; s=arc-20160816; b=gHfxQMV2tU9qd7jKvAbtVwqoZqD8nydWpUMIY8B2/0uvSm9U3PTjh2azwBOarSyf2t sXRnVYKSc3PWkjMnU2xjdKndF/s6TzQdG4e6ckvW3/pIMgNWaCp4wdgek5k/guLmPgcD SJScMG/B9QEWAM/mGWZIzbUVt3cKrvM5zbvUT8sdSGWfru18bvG2gPWUm20EKPAPKowC vWpW/Deb9XTvVxoO2i0IZUn0cyCFWz2C/NOZqIrOcDPTSIsk2pv967AS8/tgPV8Bbn1Z wJONi/tb3BR4vsF/IcW6P+sk48zCeNMKnioRW+IdSso7X6D263uk/xqNlEopq1qRWCBF 73oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=BlibFENLTWxL3qZcvscioQcCh9h4BHOWtZSqmzwML2w=; b=TgPfZJLD3+e++kZT8S1rzCOcLyzOdZRkRqXkXrsN4xT4EHOMkMX20zHuINGPmCC9Oe /GHcdd2m/DxTKWKLranP5biEPGkf6AE1lWb193GzfaV8My239Kq5mJKfJIKu6dKl9oVb /KalVvVNc9t9nQ1mPH5ssQMj6IgWuBzO5wturNJDRY62n3uUo9Zfqy7PBSA9KXG13XMi yQhQ6VNl5I9iJNZEPHfi7ddM2HQczl4gXlWjUZlbtqY+lRcN/lHcyXnXEpN5OISN0zfj WQUYuoErVA2MizvMjb03KXqMbHolSZUvE8zGX7iFFKRz3fe2xz2pNDWjjBmZz2BI/CgN FdWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IfVx9gTa; 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=pass (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 u29-20020a37ab1d000000b007427fdb6994si530308qke.456.2023.02.24.10.11.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Feb 2023 10:11:12 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=IfVx9gTa; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVcVM-0005Ca-Un; Fri, 24 Feb 2023 13:09:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVcVK-00059t-Dd for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:10 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVcVD-0004zM-N9 for qemu-devel@nongnu.org; Fri, 24 Feb 2023 13:09:09 -0500 Received: by mail-wm1-x329.google.com with SMTP id j3so239714wms.2 for ; Fri, 24 Feb 2023 10:09:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BlibFENLTWxL3qZcvscioQcCh9h4BHOWtZSqmzwML2w=; b=IfVx9gTacJ1XAklga3Qd14ZE5FuJHoJZzHBgtqJCD3eDYqp3As46AQsINnZTYY0FgQ +S71GbC2LxStBmmL7FDtAREyra73m/BHXaV7uMMyPP/6qRGPkeZfSCvFEs84xMisuKcG vuI4dBLRi5bu8DvPpn5VMPw1y4+By5epqkyIUpKwRqsIPvdW0f9Sly9kUpgKWtq19YdE pu7Avym4lDuy8Qo8Eyp35sxW1kwl4PXT4MAuUdJd81cs4mbqL2W3TIiLNbXmaQJIska7 vALRCADcEHjFNItc0kMMC5Z6/zf1EzQqNCHZCY4hgQsxvcAN5ignmv27jXXweEMyjoPl IGIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BlibFENLTWxL3qZcvscioQcCh9h4BHOWtZSqmzwML2w=; b=IO6IbUVDQ+r1NTDbgq+lYevzUrJ0MyBsaSCvEHTLjuA9GE7h45emO2ez+GcYOzFzDs 6cqJ+XY5lybxbPHBsDpIntSrhUAxaEliUz/MJqRh3V+G+JaiQ9a0VqXYOw5fqbatlI7D VhH/paBFWy8oWGQaoW0HsBFBEZ0QKUnS0Q5GR1dmIc/sUq9j6B9TzdI9CREaqdwCAwb+ 8euhmHOiqjguvwOtrBHsUf32GA8k98P7Pg4cYJE0zFdfuVxyY0PxVvllzPwGakPyffz8 UxRKYX/tGvAsK725mDY/Y7FHR5nXAT5yz2C9Je6gLWdMbNs+uDeTD9Zxa2Gr4+VdPzqM D3EQ== X-Gm-Message-State: AO0yUKWyhAnZ6RzX43qZtEYMDTKV9/G77AdQK3pMUrkW2WDiQW1P/exr g9Mo/9Op4Nl82EnSwesjZ+2MHg== X-Received: by 2002:a05:600c:44d3:b0:3da:fc30:bfc5 with SMTP id f19-20020a05600c44d300b003dafc30bfc5mr12278494wmo.13.1677262142297; Fri, 24 Feb 2023 10:09:02 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id hn29-20020a05600ca39d00b003e21f01c426sm3797726wmb.9.2023.02.24.10.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:09:01 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ACF4F1FFBE; Fri, 24 Feb 2023 18:08:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Li-Wen Hsu , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Kevin Wolf , Stefan Hajnoczi , Michael Roth , Qiuhao Li , Beraldo Leal , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Cleber Rosa , Yonggang Luo , Ed Maste , Peter Maydell , Aurelien Jarno , qemu-arm@nongnu.org, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Bastian Koppelmann , John Snow , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Alexander Bulekov , Hanna Reitz , Bandan Das , Markus Armbruster , Darren Kenny , Wainer dos Santos Moschetta , Pavel Dovgalyuk Subject: [PATCH 7/7] tests/gitlab: use kaniko to build images Date: Fri, 24 Feb 2023 18:08:57 +0000 Message-Id: <20230224180857.1050220-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224180857.1050220-1-alex.bennee@linaro.org> References: <20230224180857.1050220-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Apparently the docker-in-docker approach has some flaws including needing privileged mode to run and being quite slow. An alternative approach is to use Google's kaniko tool. It also works across different gitlab executors. Following the gitlab example code we drop all the direct docker calls and usage of the script and make a direct call to kaniko and hope the images are cacheable by others. Signed-off-by: Alex Bennée --- .gitlab-ci.d/container-template.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.d/container-template.yml b/.gitlab-ci.d/container-template.yml index c434b9c8f3..c2d7950df8 100644 --- a/.gitlab-ci.d/container-template.yml +++ b/.gitlab-ci.d/container-template.yml @@ -1,22 +1,17 @@ .container_job_template: extends: .base_job_template - image: docker:stable + image: + name: gcr.io/kaniko-project/executor:v1.9.0-debug + entrypoint: [""] stage: containers - services: - - docker:dind before_script: - export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest" - - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/$NAME:latest" - - apk add python3 - - docker info - - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" + - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/qemu/$NAME:latest" script: - echo "TAG:$TAG" - echo "COMMON_TAG:$COMMON_TAG" - - ./tests/docker/docker.py --engine docker build - -t "qemu/$NAME" -f "tests/docker/dockerfiles/$NAME.docker" - -r $CI_REGISTRY/qemu-project/qemu - - docker tag "qemu/$NAME" "$TAG" - - docker push "$TAG" - after_script: - - docker logout + - /kaniko/executor + --reproducible + --context "${CI_PROJECT_DIR}" + --dockerfile "${CI_PROJECT_DIR}/tests/docker/dockerfiles/$NAME.docker" + --destination "${TAG}"