From nobody Mon Feb 9 08:36:06 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615405069; cv=none; d=zohomail.com; s=zohoarc; b=iQYRlnEN7RsahzJ5s/b3rXVCFVcjFDZQwqYfUwnSa7ZwxJVg+s1dmKI6sCVBsKsIg1xy+oyTVUncS9O34fvzZmu2aoOIsgovdrY4rzDWPp0RwyKCu0z/6BlHqZnsUCz9H6M9SI9k3nsp2HpBEviIwoxgvYGfmvFkFrN4UN2ISQ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615405069; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3jUznPzvzYHkJS30t4l+mHbEcaUIGUHIWC+isF9wstk=; b=Z2prM+nhnJxWsF1sJzmBvZHt8d6+i2iPFEbZoSHHgUEXzwKNx1D2PNphop2JpaUkSR2HHT8319LR4DQHyA7A9/H7AeszUfayk4n5aCEPo7V3OEUjKikwk2rAvjp+XdZlN+yw9+looUrdjpu87qJQVj8mwkbk4/Q7CDmcJjlNEzU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615405069590454.64140236748597; Wed, 10 Mar 2021 11:37:49 -0800 (PST) Received: from localhost ([::1]:38610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4eS-0000Lg-FV for importer@patchew.org; Wed, 10 Mar 2021 14:37:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK4R0-00066D-Ho for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:57 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:34497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lK4Qk-0002ho-8A for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:50 -0500 Received: by mail-ed1-x52c.google.com with SMTP id b13so29865179edx.1 for ; Wed, 10 Mar 2021 11:23:34 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g1sm119321edh.31.2021.03.10.11.23.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 11:23:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E8BAB1FF87; Wed, 10 Mar 2021 19:23:31 +0000 (GMT) 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=3jUznPzvzYHkJS30t4l+mHbEcaUIGUHIWC+isF9wstk=; b=NFppSKFR5tBvZUuxHJO9GZsywQfrnscL+lhc6vVu6/SHl/of46KwTVpuzSV5OxSnCM nIwncC9D74BLo14Nl+CN+YBx1Ysdw/Fg2zZq9GCBe0lNoutebrGZlwP110ZXEdRNjP/e S84KgADjYAQzFG5ZYHFoxRFve0fRH6+mUckzR4me127tU0xM8zqJtLA+v+sMR3Ey9ZCI l8C79/bJSu/4+NHXtPA5do2yvo+np5lew4pqDX/e02CNXhtCmSvCJCDVB6t/nfLl6Yni BXYvTCYOcc5JuVbzGYhdYK+mp25sjzxsng15k50ldq1pkWcJ9WIupU2q51YYGp0VZchM E1Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3jUznPzvzYHkJS30t4l+mHbEcaUIGUHIWC+isF9wstk=; b=FhG+x5KXDEOGuXM0nX4wn55iegorQUdRbDxtSxFCPHa/lurJxfmOMreTqbU/SUrLvr Kea8AqJ7Xu8UmU6WKkCVsD8LkBiJRX6IEm9DFC8Y9z3GdJl9kfkGud/B0/oCgaA5BFW7 mIBCQz3cj2oPU35RiVTFXaqocv0I/4wHLGV1qIvD35lkkM+lZfJr04AskTRJcH0lGZh/ XJRtkQDq6tKM9xfb0ljf4VkIv3JgDnFHvjivAw3oWfkRZqr2dLItEU85/KQiIuP9OExr IzUMdwsKwuNpYC2UPb7Ha8JJLsjulCqVcld6DcpxdZCzT7YVSd6NyG0CkfjjwlVhb1sf Gr/Q== X-Gm-Message-State: AOAM5335RT2vXLw8u8C5NdfEZA76RsbjGyGdEK7JyTaNcP+8v5ZtQQOr 1BJZIckXfPOfFCUt3MBsGBg1vA== X-Google-Smtp-Source: ABdhPJwSOoRxprM8ptVtIbNXSxNaYZf/kOlXatnYfdU7R2mCwKD13pTa9uSCA44CU08kK4anFJ3dyg== X-Received: by 2002:aa7:c618:: with SMTP id h24mr5011854edq.358.1615404213746; Wed, 10 Mar 2021 11:23:33 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 1/7] tests/docker: fix copying of executable in "update" Date: Wed, 10 Mar 2021 19:23:25 +0000 Message-Id: <20210310192331.29284-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210310192331.29284-1-alex.bennee@linaro.org> References: <20210310192331.29284-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52c.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We have the same symlink chasing problem when doing an "update" operation. Fix that. Based-on: 5e33f7fead ("tests/docker: better handle symlinked libs") Signed-off-by: Alex Benn=C3=A9e --- tests/docker/docker.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index d28df4c140..0435a55d10 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -548,7 +548,14 @@ def run(self, args, argv): libs =3D _get_so_libs(args.executable) if libs: for l in libs: - tmp_tar.add(os.path.realpath(l), arcname=3Dl) + so_path =3D os.path.dirname(l) + name =3D os.path.basename(l) + real_l =3D os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname=3D"%s/%s" % (so_path, name= )) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name= )) + pass =20 # Create a Docker buildfile df =3D StringIO() --=20 2.20.1 From nobody Mon Feb 9 08:36:06 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615404525; cv=none; d=zohomail.com; s=zohoarc; b=MoAfNdRG2E/4anQ5XqqvJggR0owJtnjoUWUcE6uw7lC+PgsIB9/L1Cz42wBqXeTL4O/vl1Izl8sTE8GUq2WXUifsJiO10R2ZfzjrRA1P6Ewab8KD+UaWNon/j83WtUToyjzGCAhBIhyOPlJUoZHjs/yBQPexEhaT6oIzh6X49Lw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615404525; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3cpP5ZojDuDn/CAqL7XfB+7+n/MJmTsO9r9UuhC5UGQ=; b=KIg2C4sfqw70fzZSYDE5V3e1cEssRY/q4ytHMK7CkHT8Hy1rkuHlPT8CahXH9SOVR46U25jzTuOD+rZuq5OgdwyFUpuWcKTlBU7duZnIZhbzSi4VvsK6cwiqwXfF58dhYQ2pn+xO8HIQZZ1pcv1ncrP3ue1JJ08iifSR6IvGxRk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615404525496891.864610021972; Wed, 10 Mar 2021 11:28:45 -0800 (PST) Received: from localhost ([::1]:49960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4Vg-0000M7-CV for importer@patchew.org; Wed, 10 Mar 2021 14:28:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK4Qo-00064i-EC for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:43 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:34500) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lK4Qk-0002hs-5s for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:42 -0500 Received: by mail-ed1-x52f.google.com with SMTP id b13so29865216edx.1 for ; Wed, 10 Mar 2021 11:23:35 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id bt14sm90203edb.92.2021.03.10.11.23.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 11:23:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0C64D1FF8C; Wed, 10 Mar 2021 19:23:32 +0000 (GMT) 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=3cpP5ZojDuDn/CAqL7XfB+7+n/MJmTsO9r9UuhC5UGQ=; b=m/BOXJPYNQ9oeGDJQy4zC51B7iHxMIsxWys6Q+y+xGUJHwzI0cdqowQx8cNvvh5a20 ut+tKoElkywyj7+ZDaWRwlNVmHVOa5KFuSqcPClRFTrtUtWfhG2jjnVhgRwdpzsf1iVP ofcUwcGYNG+fAg7Jv5eChoupWUEvGqWqlrFVKThoUxHmDcQycErfX3ON/ldFaTKhepgj gZrAiSgvWzxyx1Cng+9kSCB5YDRwQvQNEabY1SNmZN3d45c8rzrpXVj/5IleBqZkcMqf 2gzCbb38zjoab+mUCe4q0Hi2pfu1ybNjDj/A2nO5z3YnD7LEAgXxllPu920Lz9ljCyVF zkrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3cpP5ZojDuDn/CAqL7XfB+7+n/MJmTsO9r9UuhC5UGQ=; b=Djc2CfKlI0E+fITmS3vd5rXW10jX3D9gsZWCGIlX+yOHPwI9RIvAMWELDN1LRZepYu 18ngzpOO2ESsWf+EfxYIGYiX8gTpEetlBpp9ArJ9bor7OJTCN14NB0DmDB13pkxJ0Z6z tAAoLCFYy+MIuFKluVWKCuihS+yP4nT9ubrFZr3TleonxAbNtXAoBWy7UJ3kHPx+YGmN i1D9SpLBw6iKA6A3AZoEcWJ+NczLSHNfvYLS13JvEY8zbAADKCmKXjTo1U0PXfkkb1AY J+TZDmRjT15awY9d8Mpt1nHCyMep7Fo2ljVBYLmxL29z/g08aQpbkk6df2diEZgETDxz Ud7w== X-Gm-Message-State: AOAM530DchWDU4QCFer75IzGILpjbJln9bfRaUcFvDGOStI0fXNy9I2N 15NtRLEi1JAHlMvvGluI0nkE2A== X-Google-Smtp-Source: ABdhPJzBHmzsjU+wQS2YL6Pl4HBEva61ZZcm57VPidrP7yejobFpKChjxMyarAu821+h6rd/EOEJHA== X-Received: by 2002:aa7:d7da:: with SMTP id e26mr5073445eds.269.1615404214437; Wed, 10 Mar 2021 11:23:34 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 2/7] tests/docker: make executable an optional argument to "update" Date: Wed, 10 Mar 2021 19:23:26 +0000 Message-Id: <20210310192331.29284-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210310192331.29284-1-alex.bennee@linaro.org> References: <20210310192331.29284-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52f.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, berrange@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We're going to extend the abilities of the command shortly. Signed-off-by: Alex Benn=C3=A9e --- tests/docker/Makefile.include | 2 +- tests/docker/docker.py | 56 ++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 7cab761bf5..8f66049dcc 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -245,7 +245,7 @@ docker-run: docker-qemu-src $(if $(EXECUTABLE), \ $(call quiet-command, \ $(DOCKER_SCRIPT) update \ - $(IMAGE) $(EXECUTABLE), \ + $(IMAGE) --executable $(EXECUTABLE), \ " COPYING $(EXECUTABLE) to $(IMAGE)")) $(call quiet-command, \ $(DOCKER_SCRIPT) run \ diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 0435a55d10..2352fdcd24 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -523,7 +523,7 @@ class UpdateCommand(SubCommand): def args(self, parser): parser.add_argument("tag", help=3D"Image Tag") - parser.add_argument("executable", + parser.add_argument("--executable", help=3D"Executable to copy") =20 def run(self, args, argv): @@ -532,35 +532,37 @@ def run(self, args, argv): tmp =3D tempfile.NamedTemporaryFile(suffix=3D"dckr.tar.gz") tmp_tar =3D TarFile(fileobj=3Dtmp, mode=3D'w') =20 - # Add the executable to the tarball, using the current - # configured binfmt_misc path. If we don't get a path then we - # only need the support libraries copied - ff, enabled =3D _check_binfmt_misc(args.executable) - - if not enabled: - print("binfmt_misc not enabled, update disabled") - return 1 - - if ff: - tmp_tar.add(args.executable, arcname=3Dff) - - # Add any associated libraries - libs =3D _get_so_libs(args.executable) - if libs: - for l in libs: - so_path =3D os.path.dirname(l) - name =3D os.path.basename(l) - real_l =3D os.path.realpath(l) - try: - tmp_tar.add(real_l, arcname=3D"%s/%s" % (so_path, name= )) - except FileNotFoundError: - print("Couldn't add %s/%s to archive" % (so_path, name= )) - pass - # Create a Docker buildfile df =3D StringIO() df.write(u"FROM %s\n" % args.tag) - df.write(u"ADD . /\n") + + if args.executable: + # Add the executable to the tarball, using the current + # configured binfmt_misc path. If we don't get a path then we + # only need the support libraries copied + ff, enabled =3D _check_binfmt_misc(args.executable) + + if not enabled: + print("binfmt_misc not enabled, update disabled") + return 1 + + if ff: + tmp_tar.add(args.executable, arcname=3Dff) + + # Add any associated libraries + libs =3D _get_so_libs(args.executable) + if libs: + for l in libs: + so_path =3D os.path.dirname(l) + name =3D os.path.basename(l) + real_l =3D os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname=3D"%s/%s" % (so_path,= name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path,= name)) + pass + + df.write(u"ADD . /\n") =20 df_bytes =3D BytesIO(bytes(df.getvalue(), "UTF-8")) =20 --=20 2.20.1 From nobody Mon Feb 9 08:36:06 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615404809; cv=none; d=zohomail.com; s=zohoarc; b=Ystmy+bZpkA1bkCEBuQNOnOfPVI2AunNeQwCCgRXr0zXPmRVatqD2utOhzoIeEMAjKxP0poLF7BPjJaj3sDg8feLfP2iSJU3pEtA+Zl/cALqbmbXAs52gv8vax+Zcs2tiUxF/jnLcoOvZ0SZlH8fSiyf7pN2dFMDGbT+gzf6ATM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615404809; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MFa+cdC9IBoTS22ijLymreQbHtfFC8aWs/cXqoq0jLU=; b=OqWWDslq5cDSbFnDfo9/h6oj/Y0R8BGXx9rsu7zrh+m67m8AEv8NkqYOOLv64wp0Md0aQUP7ndyRtU4/SkRWJTaLweHOFShRTYotAufwmvQfAHHx+dsNGXmaNA3Xy8/Sv8aWRXPcIxKhOaV4mHVX9J/QUe3el1EinyHBd1EytyE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615404809958395.9831463504397; Wed, 10 Mar 2021 11:33:29 -0800 (PST) Received: from localhost ([::1]:58410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4aG-0004jL-O5 for importer@patchew.org; Wed, 10 Mar 2021 14:33:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK4Qp-00065D-Ej for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:43 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:42224) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lK4Qk-0002ie-SM for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:43 -0500 Received: by mail-ej1-x632.google.com with SMTP id c10so40933511ejx.9 for ; Wed, 10 Mar 2021 11:23:38 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r5sm185435ejx.96.2021.03.10.11.23.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 11:23:33 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 264D71FF8F; Wed, 10 Mar 2021 19:23:32 +0000 (GMT) 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=MFa+cdC9IBoTS22ijLymreQbHtfFC8aWs/cXqoq0jLU=; b=SZaqtvYBS08K9aihvAFHuz1wZIitaMWYOzuwZBQJxikjH1g2HbsbTB8BvKbo3AkHf8 dAJsFzXB9h//LJKirSrNbsBA25VU9eR83vqnkqIJgSsR9bCpPGVQnChuMwr8XPyCADcV Qrr08ZOeJJDBLEU9kekaba155Xft4kbPHqP7oR4pdNTJlAZh8jXyRUV1x6FvjBNWmJuB MSJB5BBrU+ctuEqxLeVzoxKeFt7LpDb70TFM0CAj05DbjBsBg9b1bthPhgR4SXN9CDUR EEaeiGtfsi+tqSklCn5thmf39Y5CZpjlOCMyu6IuJH2SYYVuG3FoBxm5iSvBwcBxCWmx Jfjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MFa+cdC9IBoTS22ijLymreQbHtfFC8aWs/cXqoq0jLU=; b=f7ynjlwQ0Ep+T0qE5WiJZxedH6KsOpdVmpyW55N+5/1MuapoZxW2z+F3DaGnU+JkSI 6MIS6gAjHoscPyLr9CVqd0dZtJuJ3TQMsoqg439KDtnN7h5mO7VtfMQ1J2Sqceo8c2Lt U2Q1UxRX1rcOmTXihUzP/ITuW8D8Q81ORCG5U/jur7oCoPPR07dDKmm0ASIOuQAQ1828 uSNz9Np1UGnQ1Z2biql46xDNg0ochFKQfdgpuNmFO9rHBmwooJACROzSEpLDQ+bEL7LZ NIOdR/PVpcDeyC99YAtZEmf0nJiaA/LsbUPKfpRZ3zJoyM+xhY73VBlV8A3yl/YYq1Ev 3kIQ== X-Gm-Message-State: AOAM530foaGW2q07P9AXp1LIgr8XqLflyvFF5VcGC02BGfi8/jNU6Xzh nGvnxOdF12AnnHcMkEbFoTIOEw== X-Google-Smtp-Source: ABdhPJySPeUUymNgRrBJXEbT8/7K8rO0ADyu8y4t9XyaNRfi/xUDE9IL0WBvjaGQkXm3q73pWtcn3w== X-Received: by 2002:a17:906:75a:: with SMTP id z26mr39380ejb.22.1615404217007; Wed, 10 Mar 2021 11:23:37 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 3/7] tests/docker: allow "update" to add the current user Date: Wed, 10 Mar 2021 19:23:27 +0000 Message-Id: <20210310192331.29284-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210310192331.29284-1-alex.bennee@linaro.org> References: <20210310192331.29284-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x632.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, berrange@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The current user functionality is used for cross compiling to avoid complications with permissions when building test programs. However for images that come from the registry we still need the ability to add the user after the fact. Signed-off-by: Alex Benn=C3=A9e --- tests/docker/docker.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 2352fdcd24..86d31a5fe6 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -517,7 +517,7 @@ def run(self, args, argv): =20 =20 class UpdateCommand(SubCommand): - """ Update a docker image with new executables. Args: """ + """ Update a docker image. Args: """ name =3D "update" =20 def args(self, parser): @@ -525,6 +525,9 @@ def args(self, parser): help=3D"Image Tag") parser.add_argument("--executable", help=3D"Executable to copy") + parser.add_argument("--add-current-user", "-u", dest=3D"user", + action=3D"store_true", + help=3D"Add the current user to image's passwd= ") =20 def run(self, args, argv): # Create a temporary tarball with our whole build context and @@ -564,6 +567,13 @@ def run(self, args, argv): =20 df.write(u"ADD . /\n") =20 + if args.user: + uid =3D os.getuid() + uname =3D getpwuid(uid).pw_name + df.write("\n") + df.write("RUN id %s 2>/dev/null || useradd -u %d -U %s" % + (uname, uid, uname)) + df_bytes =3D BytesIO(bytes(df.getvalue(), "UTF-8")) =20 df_tar =3D TarInfo(name=3D"Dockerfile") --=20 2.20.1 From nobody Mon Feb 9 08:36:06 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615404538; cv=none; d=zohomail.com; s=zohoarc; b=bfd5H6visLOQUMv16+JjPzdUdr5KgC731pSR20g1xb0DES6la76D+JI+9pR9hexwmpnuxTxqCF2mYVu8VXNIb8aPWq8GsykHHy7ckEAH8u60BLGzt71q3630rQQmG8OIfTxgJaWcjryc3skui4NhDQkWByWLyCGWoVTvUiYbabI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615404538; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KGrYzIufJSpHy5l9wMOv7nypCu9GhpL0NWYqpZ6BI7Q=; b=ip2Tkpkm5M7gkwbcU5Lh1Ksh+tjZJKLjn6Dl7du3p03Lak2anYgQ2t7Gutrw/f76hE457U+kh8+10+1t9K3Yo9AZKOZRWApQO05HNlilq5bQISqxVi0nlou8DLldGZcdbd1ErkH+vxrQFdKtHp5YYR8uTEN+EDDNAEugZ/EzkzU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615404538349677.1854933886526; Wed, 10 Mar 2021 11:28:58 -0800 (PST) Received: from localhost ([::1]:50184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4Vr-0000SK-9R for importer@patchew.org; Wed, 10 Mar 2021 14:28:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK4Qq-00065H-2j for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:44 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:33597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lK4Qm-0002kC-Bb for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:43 -0500 Received: by mail-ej1-x62c.google.com with SMTP id jt13so41079163ejb.0 for ; Wed, 10 Mar 2021 11:23:39 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e22sm95477edu.61.2021.03.10.11.23.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 11:23:36 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3FA6E1FF90; Wed, 10 Mar 2021 19:23:32 +0000 (GMT) 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=KGrYzIufJSpHy5l9wMOv7nypCu9GhpL0NWYqpZ6BI7Q=; b=WhfDZF7poRcYiWTUNS4HZa2X96XW+LlxhDi1zgIDRryQt+i6M45oOXoVMayUKdv3AA gv1/ed1n0EfzuW7QeXq8qm1dF1TOVuNYNNuyxbh01GHNHiFEkr9BtvRjh2z8FaGQJpFo Eh6szjbI+thgGUgTDXqBh4FQnZlVaamhRibDN54dm+jaUBbQEhJEKevFPdOv8g7lft7j 9GTwfJJZPe9rj2EOq7TZbZgTLEPHHzSDoO5VOi9RiL5xdZaZAFxE/7XMCe3S3l0Zz3jT 3nusQRmBeQz6n/s+IKLUpCCJMonXrfZA/lhmQ/rAzCKRreLl5nrqCPb1pmlhHUwpo6EO F8zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KGrYzIufJSpHy5l9wMOv7nypCu9GhpL0NWYqpZ6BI7Q=; b=JBdkNOjg/iGr1PpeDt2bAaBQFCn2k42YUojWlJh5TZhEvEUGRXfN1yzqMvvZs5tczB Yo5jXaupcWUvSfE0M/4z8MdwHXhhyAit2nnoOmBhgCJVQetQB78WPe+90PPNo51GWwVE yRCNA+sdCJ07hAuMQlWBrgXZ9el0L29FWLTf0mOXOgm4u3K669jnJ7/nW2xlKhAcLYYG 5Y9cObx0Nd91DDkxlaAllgsRIOHqWUbQbLJFDc7gkWZo3YL01M+Nru0+vjrtMVYslyCH R8KcCd6jRHzQaeoDQ1mNxHq72aWtGRuQOkSTl9oqPE351i452XXL0kCaUyBoh5G1KZFo om4Q== X-Gm-Message-State: AOAM532MhbiXK4QP+tpxulfbPRmsT3FM0PHVJty7uD8h0WHDiwO6b4y1 DL96kH1zKDe31Try9qYzjKubjXRW24n2uQ== X-Google-Smtp-Source: ABdhPJzcRPb/rndjj+G5HTnJPEJEbQ95T/4GLDrtmgwpUuPcodhYj6OS4R6QuoBvlfCG7Hq58LOKMQ== X-Received: by 2002:a17:906:18aa:: with SMTP id c10mr25632ejf.248.1615404219070; Wed, 10 Mar 2021 11:23:39 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 4/7] tests/docker: add "fetch" sub-command Date: Wed, 10 Mar 2021 19:23:28 +0000 Message-Id: <20210310192331.29284-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210310192331.29284-1-alex.bennee@linaro.org> References: <20210310192331.29284-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62c.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, berrange@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This simply wraps up fetching a build from the registry and tagging it as the local build. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/docker/docker.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 86d31a5fe6..f6f461bbc9 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -515,6 +515,23 @@ def run(self, args, argv): =20 return 0 =20 +class FetchCommand(SubCommand): + """ Fetch a docker image from the registry. Args: """ + name =3D "fetch" + + def args(self, parser): + parser.add_argument("tag", + help=3D"Local tag for image") + parser.add_argument("registry", + help=3D"Docker registry") + + def run(self, args, argv): + dkr =3D Docker() + dkr.command(cmd=3D"pull", quiet=3Dargs.quiet, + argv=3D["%s/%s" % (args.registry, args.tag)]) + dkr.command(cmd=3D"tag", quiet=3Dargs.quiet, + argv=3D["%s/%s" % (args.registry, args.tag), args.tag]) + =20 class UpdateCommand(SubCommand): """ Update a docker image. Args: """ --=20 2.20.1 From nobody Mon Feb 9 08:36:06 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615404818; cv=none; d=zohomail.com; s=zohoarc; b=nJmsIA7NIRwqXWvwbE0hsmGG1jiQdcoVUHKoImfI6cK8zgNDdOXNPi8DpL8WJWMUKvfejwxF6WwTb8oUle2mLxjEsKS6pfu/u3K6evMsUKnhg2bxo4ZEORZlMLKQV8bbPpONZYqxg9WNVufradTLu1keXFfstyoU7lHOVEL6ZeI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615404818; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kMSl2nUioQRSggV946FzlETeW29Qa6scCLbuYk6OMBk=; b=TvGrNFO8uPyoXJ24xYF85fA8liHriTZc+CxWyi6Gy5zOGri4nThlHfw7ZmYv7i8GkeYVMAX1wdpMjoXkzIgNmRhjsqO83fJ4X8q4+f2VFzQd1AWuadHjStKsSidhHlbBRRHzuIXkMURZQmAbifjwEYlCyy9YW1ZnxgsrMHjrysk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615404818624961.8271035542232; Wed, 10 Mar 2021 11:33:38 -0800 (PST) Received: from localhost ([::1]:58704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4aP-0004rv-Cq for importer@patchew.org; Wed, 10 Mar 2021 14:33:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK4R4-00068O-CG for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:24:05 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:44759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lK4Qq-0002l8-1a for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:56 -0500 Received: by mail-ej1-x62d.google.com with SMTP id ox4so25392977ejb.11 for ; Wed, 10 Mar 2021 11:23:43 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q12sm183577ejy.91.2021.03.10.11.23.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 11:23:38 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 622C91FF91; Wed, 10 Mar 2021 19:23:32 +0000 (GMT) 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=kMSl2nUioQRSggV946FzlETeW29Qa6scCLbuYk6OMBk=; b=hj+BkBKmL4JhqNKG/Rz/JuFlWzQP14mYwqG0p9wUQXuTus4tTNk3t3MO5eN3rqAInX quv9SMCYIDfbEuCT/2ZuE7AwEWf7ZkoeRGCzK8mJOqyInXLwJq6NoO/QH0uhoYvelGkA Awe3wVBsT2rVIBZQP4GK6wcZdjlFZc1q+cmFPn6+aN9vtP6q77zAByIxH0lgqM65iZMB pp8q7LdX0KXEaa5t7J1D0T1EYe0hhJD9/mwtr9M0TRgZh8ZTelBi/WATeMBQTWgNHrBc 4wfNdgaeem9vVBIaE5Sr4jwOrBkCFimbgeFdgKrv2w3dlGD/IYPCfe76YHI32oWkBA72 8zow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kMSl2nUioQRSggV946FzlETeW29Qa6scCLbuYk6OMBk=; b=ELcHT3Hv9/trt4v/MAGd2h1hDDAiIecdPQPTXYyVGlQ/DK7PSOIaOC79q+IQP9fcJF gmpJ95eguEAoFmUuH6sAdXybsfdMJcreFAZjE65VBW0qClf8czv0tumhQRz3+BTS0Fza Sb2mm/wIq157bgDqyok4MPwVrNJKtFxD7CRv33C/0jOXQjwPAH/deTQHG4Dn5n+mW+/K sQwKe3ZhKgOEBdps0rTRrBfKCC4UU/7Pim8nzrnqfX3PJz+auXHSsv8qafAxw3suxsod W9dS/o7inWHATDZobe5DKxSXrF3T5IV//602iY5R2II3NLORu+b9+F72Gi/KoAyzLOUN 7JJQ== X-Gm-Message-State: AOAM531UrwOmtuvwnNMGtxNr/wFU9BoPPmywZuwnTCtcDHOEWQ06kzRd dTxGXgXc3Li4hDjy2qpijiAs9Q== X-Google-Smtp-Source: ABdhPJwqJthlkPG83Sjd7OELHBfNbPXRTiCBKQ4IoMSVwSauGtbrkMrNXxPLBmCYvcJuyQyUsJIJrA== X-Received: by 2002:a17:906:32da:: with SMTP id k26mr5226475ejk.483.1615404222674; Wed, 10 Mar 2021 11:23:42 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 5/7] docker: Add Hexagon image Date: Wed, 10 Mar 2021 19:23:29 +0000 Message-Id: <20210310192331.29284-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210310192331.29284-1-alex.bennee@linaro.org> References: <20210310192331.29284-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.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, Alessandro Di Federico , berrange@redhat.com, Brian Cain , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Alessandro Di Federico This image is a little special because it takes a long time to build. As such most users don't want to be doing that and just pull random binaries from the ether as intended by the container gods. This involves someone with credentials and a beefy machine running: make docker-image-debian-hexagon-cross V=3D1 NOCACHE=3D1 J=3D30 docker tag qemu/debian-hexagon-cross registry.gitlab.com/qemu-project/qem= u/qemu/debian-hexagon-cross docker push registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cro= ss With a suitable binary in the "cloud" a normal user will run: make docker-image-debian-hexagon-cross or have it run for them through the dependency mechanism of our over-engineered makefiles and get the binary they wanted. There are a few wrinkles of course including needing to tweak the final image to have the credentials of the user so we can actually do our cross compiles. Signed-off-by: Alex Benn=C3=A9e Cc: Alessandro Di Federico Cc: Philippe Mathieu-Daud=C3=A9 Cc: Brian Cain --- vAJB: - dropped all r-b/sob due to rewrite - split into a multi-stage dockerfile - make dockerfile standalone - play fugly make games --- MAINTAINERS | 2 + tests/docker/Makefile.include | 22 +++ .../dockerfiles/debian-hexagon-cross.docker | 44 ++++++ .../build-toolchain.sh | 141 ++++++++++++++++++ 4 files changed, 209 insertions(+) create mode 100644 tests/docker/dockerfiles/debian-hexagon-cross.docker create mode 100755 tests/docker/dockerfiles/debian-hexagon-cross.docker.d/= build-toolchain.sh diff --git a/MAINTAINERS b/MAINTAINERS index 3456993062..712c25b077 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -196,6 +196,8 @@ F: linux-user/hexagon/ F: tests/tcg/hexagon/ F: disas/hexagon.c F: default-configs/targets/hexagon-linux-user.mak +F: docker/dockerfiles/debian-hexagon-cross.docker +F: docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh =20 HPPA (PA-RISC) TCG CPUs M: Richard Henderson diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 8f66049dcc..b075dfe9ce 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -145,6 +145,28 @@ docker-image-debian-s390x-cross: docker-image-debian10 docker-image-debian-sh4-cross: docker-image-debian10 docker-image-debian-sparc64-cross: docker-image-debian10 =20 +# +# The build rule for hexagon-cross is special in so far for most of +# the time we don't want to build it. While dockers caching does avoid +# this most of the time sometimes we want to force the issue. +# +docker-image-debian-hexagon-cross: $(DOCKER_FILES_DIR)/debian-hexagon-cros= s.docker + $(if $(NOCACHE), \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) build -t qemu/debian-hexagon-cross -f $< \ + $(if $V,,--quiet) --no-cache \ + --registry $(DOCKER_REGISTRY) --extra-files \ + $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker.d/build-toolchain.sh, \ + "BUILD", "debian-hexagon-cross"), \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) fetch $(if $V,,--quiet) \ + qemu/debian-hexagon-cross $(DOCKER_REGISTRY), \ + "FETCH", "debian-hexagon-cross") \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) update $(if $V,,--quiet) \ + qemu/debian-hexagon-cross --add-current-user, \ + "PREPARE", "debian-hexagon-cross")) + # Specialist build images, sometimes very limited tools docker-image-debian-tricore-cross: docker-image-debian10 docker-image-debian-all-test-cross: docker-image-debian10 diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/d= ocker/dockerfiles/debian-hexagon-cross.docker new file mode 100644 index 0000000000..b6fb651450 --- /dev/null +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker @@ -0,0 +1,44 @@ +# +# Docker Hexagon cross-compiler target +# +# This docker target is used for building hexagon tests. As it also +# needs to be able to build QEMU itself in CI we include it's +# build-deps. It is also a "stand-alone" image so as not to be +# triggered by re-builds on other base images given it takes a long +# time to build. +# +FROM qemu/debian10 + +# Install common build utilities +RUN apt update && \ + DEBIAN_FRONTEND=3Dnoninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ + apt install -y --no-install-recommends \ + bison \ + cmake \ + flex \ + lld \ + rsync \ + wget + +ENV TOOLCHAIN_INSTALL /usr/local +ENV ROOTFS /usr/local + +ENV LLVM_URL https://github.com/llvm/llvm-project/archive/3d8149c2a1228609= fd7d7c91a04681304a2f0ca9.tar.gz +ENV MUSL_URL https://github.com/quic/musl/archive/aff74b395fbf59cd7e93b369= 1905aa1af6c0778c.tar.gz +ENV LINUX_URL https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.18.ta= r.xz + +ADD build-toolchain.sh /root/hexagon-toolchain/build-toolchain.sh + +RUN cd /root/hexagon-toolchain && ./build-toolchain.sh + +FROM debian:buster-slim +# Duplicate deb line as deb-src +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sourc= es.list +# Install QEMU build deps for use in CI +RUN apt update && \ + DEBIAN_FRONTEND=3Dnoninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ + apt build-dep -yy --arch-only qemu +COPY --from=3D0 /usr/local /usr/local +ENV PATH $PATH:/usr/local/bin/ diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-t= oolchain.sh b/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-= toolchain.sh new file mode 100755 index 0000000000..19b1c9f83e --- /dev/null +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchai= n.sh @@ -0,0 +1,141 @@ +#!/bin/bash + +set -e + +BASE=3D$(readlink -f ${PWD}) + +TOOLCHAIN_INSTALL=3D$(readlink -f "$TOOLCHAIN_INSTALL") +ROOTFS=3D$(readlink -f "$ROOTFS") + +TOOLCHAIN_BIN=3D${TOOLCHAIN_INSTALL}/bin +HEX_SYSROOT=3D${TOOLCHAIN_INSTALL}/hexagon-unknown-linux-musl +HEX_TOOLS_TARGET_BASE=3D${HEX_SYSROOT}/usr + +function cdp() { + DIR=3D"$1" + mkdir -p "$DIR" + cd "$DIR" +} + +function fetch() { + DIR=3D"$1" + URL=3D"$2" + TEMP=3D"$(readlink -f "$PWD/tmp.tar.gz")" + wget --quiet "$URL" -O "$TEMP" + cdp "$DIR" + tar xaf "$TEMP" --strip-components=3D1 + rm "$TEMP" + cd - +} + +build_llvm_clang() { + fetch "$BASE/llvm-project" "$LLVM_URL" + cdp "$BASE/build-llvm" + + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=3DRelease \ + -DCMAKE_INSTALL_PREFIX=3D${TOOLCHAIN_INSTALL} \ + -DLLVM_ENABLE_LLD=3DON \ + -DLLVM_TARGETS_TO_BUILD=3D"Hexagon" \ + -DLLVM_ENABLE_PROJECTS=3D"clang;lld" \ + "$BASE/llvm-project/llvm" + ninja all install + cd ${TOOLCHAIN_BIN} + ln -sf clang hexagon-unknown-linux-musl-clang + ln -sf clang++ hexagon-unknown-linux-musl-clang++ + ln -sf llvm-ar hexagon-unknown-linux-musl-ar + ln -sf llvm-objdump hexagon-unknown-linux-musl-objdump + ln -sf llvm-objcopy hexagon-unknown-linux-musl-objcopy + ln -sf llvm-readelf hexagon-unknown-linux-musl-readelf + ln -sf llvm-ranlib hexagon-unknown-linux-musl-ranlib + + # workaround for now: + cat < hexagon-unknown-linux-musl.cfg +-G0 --sysroot=3D${HEX_SYSROOT} +EOF +} + +build_clang_rt() { + cdp "$BASE/build-clang_rt" + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=3DRelease \ + -DLLVM_CONFIG_PATH=3D"$BASE/build-llvm/bin/llvm-config" \ + -DCMAKE_ASM_FLAGS=3D"-G0 -mlong-calls -fno-pic --target=3Dhexagon-unkn= own-linux-musl " \ + -DCMAKE_SYSTEM_NAME=3DLinux \ + -DCMAKE_C_COMPILER=3D"${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clan= g" \ + -DCMAKE_ASM_COMPILER=3D"${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-cl= ang" \ + -DCMAKE_INSTALL_PREFIX=3D${HEX_TOOLS_TARGET_BASE} \ + -DCMAKE_CROSSCOMPILING=3DON \ + -DCMAKE_C_COMPILER_FORCED=3DON \ + -DCMAKE_CXX_COMPILER_FORCED=3DON \ + -DCOMPILER_RT_BUILD_BUILTINS=3DON \ + -DCOMPILER_RT_BUILTINS_ENABLE_PIC=3DOFF \ + -DCMAKE_SIZEOF_VOID_P=3D4 \ + -DCOMPILER_RT_OS_DIR=3D \ + -DCAN_TARGET_hexagon=3D1 \ + -DCAN_TARGET_x86_64=3D0 \ + -DCOMPILER_RT_SUPPORTED_ARCH=3Dhexagon \ + -DLLVM_ENABLE_PROJECTS=3D"compiler-rt" \ + "$BASE/llvm-project/compiler-rt" + ninja install-compiler-rt +} + +build_musl_headers() { + fetch "$BASE/musl" "$MUSL_URL" + cd "$BASE/musl" + make clean + CC=3D${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + CROSS_COMPILE=3Dhexagon-unknown-linux-musl \ + LIBCC=3D${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CROSS_CFLAGS=3D"-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target= =3Dhexagon-unknown-linux-musl" \ + ./configure --target=3Dhexagon --prefix=3D${HEX_TOOLS_TARGET_BASE} + PATH=3D${TOOLCHAIN_BIN}:$PATH make CROSS_COMPILE=3D install-headers + + cd ${HEX_SYSROOT}/.. + ln -sf hexagon-unknown-linux-musl hexagon +} + +build_kernel_headers() { + fetch "$BASE/linux" "$LINUX_URL" + mkdir -p "$BASE/build-linux" + cd "$BASE/linux" + make O=3D../build-linux ARCH=3Dhexagon \ + KBUILD_CFLAGS_KERNEL=3D"-mlong-calls" \ + CC=3D${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + LD=3D${TOOLCHAIN_BIN}/ld.lld \ + KBUILD_VERBOSE=3D1 comet_defconfig + make mrproper + + cd "$BASE/build-linux" + make \ + ARCH=3Dhexagon \ + CC=3D${TOOLCHAIN_BIN}/clang \ + INSTALL_HDR_PATH=3D${HEX_TOOLS_TARGET_BASE} \ + V=3D1 \ + headers_install +} + +build_musl() { + cd "$BASE/musl" + make clean + CROSS_COMPILE=3Dhexagon-unknown-linux-musl- \ + AR=3Dllvm-ar \ + RANLIB=3Dllvm-ranlib \ + STRIP=3Dllvm-strip \ + CC=3Dclang \ + LIBCC=3D${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CFLAGS=3D"-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=3Dhex= agon-unknown-linux-musl" \ + ./configure --target=3Dhexagon --prefix=3D${HEX_TOOLS_TARGET_BASE} + PATH=3D${TOOLCHAIN_BIN}/:$PATH make CROSS_COMPILE=3D install + cd ${HEX_TOOLS_TARGET_BASE}/lib + ln -sf libc.so ld-musl-hexagon.so + ln -sf ld-musl-hexagon.so ld-musl-hexagon.so.1 + cdp ${HEX_TOOLS_TARGET_BASE}/../lib + ln -sf ../usr/lib/ld-musl-hexagon.so.1 +} + +build_llvm_clang +build_kernel_headers +build_musl_headers +build_clang_rt +build_musl --=20 2.20.1 From nobody Mon Feb 9 08:36:06 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615405258; cv=none; d=zohomail.com; s=zohoarc; b=MloN6wigNsfcEmcD01aIKQrbu+z4dhNdAG3YgEqF3les9GJ/kOY+T+cEZREMVE0OWHbMIV76ZM1+/eCHbJ5xDX0nx9eqWDftsFQ7AlWvEjh1YtC952kkRbmSTQgpkKsyNnE4j1YXTBppa1raAQMEMmxGp5/gpRydnrf6/Y5BjFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615405258; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hIWJZmL4ryUgyEw+W352gXcuQhd67mjmkYPqHcAbcc4=; b=VOoauGBxB4ADrBRH7fvaPKbLVdQ+TINDBs6NkSVNexaetYTDiUe76NBaFE1cIm2WF1ji4pI+JMz7NuXPzfst5CbQ1FJtoh0mzQrwuZN/9Mz30oaypf7HC7xtPqtYuRQiaLGzFVyDE1hhJO8zf5eY9lKU0ph2LjhvHQWXRyd8Tlo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615405258845534.7898852993881; Wed, 10 Mar 2021 11:40:58 -0800 (PST) Received: from localhost ([::1]:46990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4hV-0003pn-Q0 for importer@patchew.org; Wed, 10 Mar 2021 14:40:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK4R0-00066E-IW for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:57 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:46131) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lK4Qp-0002l4-Ai for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:53 -0500 Received: by mail-ed1-x534.google.com with SMTP id w9so29704355edt.13 for ; Wed, 10 Mar 2021 11:23:42 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s9sm106695edd.16.2021.03.10.11.23.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 11:23:38 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 77D521FF92; Wed, 10 Mar 2021 19:23:32 +0000 (GMT) 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=hIWJZmL4ryUgyEw+W352gXcuQhd67mjmkYPqHcAbcc4=; b=v4k/ruwwN1IN2PFooa4I8IeYwJidHete0lJUOOMZfDhxLqY+Iyh51l04hunuPCfAnh 3+vjckQ4vgqEq7kz51BGv4lCc4P36y20/abSZSCoJNBQn9SMA9W6R4E94ULL/MehmHXJ VrwbL3rflosYY3+8m/ks8gxYu22VhrifarglRu3dsOEKjmX3A5yYLU/cb+6/OsEAvEpJ fGsjppWqDLgj09CGIi+1Vn9LYepWIO9SAK9Nj37Vc2PcOFmuBNS5FLC9QUFHoylk2RTN FBhVw8DP5x2N18RCztYtThyUEESLgaLZ6HiKiESObK+e1B/5EvfrVICGCX125e6c2xki wAdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hIWJZmL4ryUgyEw+W352gXcuQhd67mjmkYPqHcAbcc4=; b=BgXOrGCGjU22rDC0S56TlkZFzMeIQuM2dSVDDsVnVwu9UR/qACahyy3FWyV0GZ+Z8T YSpq8UuVlPUPWH5D6QTtNVqKLTvbIyRYMaPPiQlqtHriV/F4O54HEQfbwWR1DDfeWuUd Z79KcvEft2agKNP9hfQ6dDhC50V9J+WZA3i+lFR+RB6A0U1x9YHCcGVU7sGofchEb/6W 5t3iDKheQBnpIAQIkhJd3nCdeFK8CllrkCrurNFp4hywxQgOkT1tW7IVErPCBsc/feje g2obUBKSQsdxcUol0Fa5wZqsfryGNeqBvwdvpkB8g8wFwQ5q1jaEbKDOGrCpcnplcwNG fStw== X-Gm-Message-State: AOAM531Bec7LlXk/k1OVfq3AfHk/vqNYgl67FCDtrCyOkzNC1JKxDLz7 3ZeCO1tuxg0XIumrVnpHx2Kmzg== X-Google-Smtp-Source: ABdhPJyNP+Kvtuh0caPbbGoOf/TNcmCQcTZKR5CRyP3syU8Bx97APecWhhKxhzebxgPHNYm1AjYn7A== X-Received: by 2002:a05:6402:c:: with SMTP id d12mr4964800edu.100.1615404221964; Wed, 10 Mar 2021 11:23:41 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 6/7] tests/tcg: Use Hexagon Docker image Date: Wed, 10 Mar 2021 19:23:30 +0000 Message-Id: <20210310192331.29284-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210310192331.29284-1-alex.bennee@linaro.org> References: <20210310192331.29284-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Alessandro Di Federico , berrange@redhat.com, f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Alessandro Di Federico [PMD: Split from 'Add Hexagon Docker image' patch] Signed-off-by: Alessandro Di Federico Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210228222314.304787-5-f4bug@amsat.org> Message-Id: <20210305092328.31792-6-alex.bennee@linaro.org> --- tests/tcg/configure.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 36b8a73a54..f70fd7435d 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -124,6 +124,10 @@ for target in $target_list; do container_image=3Dfedora-cris-cross container_cross_cc=3Dcris-linux-gnu-gcc ;; + hexagon-*) + container_image=3Ddebian-hexagon-cross + container_cross_cc=3Dhexagon-unknown-linux-musl-clang + ;; hppa-*) container_image=3Ddebian-hppa-cross container_cross_cc=3Dhppa-linux-gnu-gcc --=20 2.20.1 From nobody Mon Feb 9 08:36:06 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615405263; cv=none; d=zohomail.com; s=zohoarc; b=ZgQBjd8/L0cAeQ5et6oK9NaU9pcbI2xxXEBL57Vne2ubr7IpbyLZSeBtzP0MoDZxzWFGHCyl6O7ccQ10P4Gy2rWLPfKpaOXY/DyQ23V60mTnjZfftQxMaFlyLUYuxaHFT8kJdm7uTFYZ1ZCXsqp0gmX+P/Goz+usOntXK1Syl+A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615405263; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Pcd1m2NC4VwbRyf9cPBN7WkrmDonr/2ABTYfeew9jPY=; b=ZDv4yYf8cAVmsWgW1W83WY7E6htuEseL76PtkiSaHUUtjEGs9hEHCDTzuZ9xCvo0ekZuNoK5y8tgQ9C9Dvk8Q1LrlWZdb0LMvcN7plH4iTrsV1Ulaws1pitgpehweOoWvCg8ikYp1vHw8lYBXFTmW4xnTjdwaS6pWWcreFREfI0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16154052633621011.8415650644787; Wed, 10 Mar 2021 11:41:03 -0800 (PST) Received: from localhost ([::1]:47330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4ha-0003yG-8T for importer@patchew.org; Wed, 10 Mar 2021 14:41:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK4R0-00066F-IL for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:57 -0500 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:39970) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lK4Qo-0002kg-10 for qemu-devel@nongnu.org; Wed, 10 Mar 2021 14:23:52 -0500 Received: by mail-ej1-x635.google.com with SMTP id ci14so40910674ejc.7 for ; Wed, 10 Mar 2021 11:23:40 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id hd37sm165994ejc.114.2021.03.10.11.23.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 11:23:38 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8CA2C1FF93; Wed, 10 Mar 2021 19:23:32 +0000 (GMT) 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=Pcd1m2NC4VwbRyf9cPBN7WkrmDonr/2ABTYfeew9jPY=; b=y3OX232Qhqag4TiYg+JUVib2MpoDsaPmoZXtQ7QokQUh+ro4bb9EllszZm9n8wO/h7 YUpmZZPJMYGoRUMOmh+h8xG4PdYeAGgf/GL5CLRZ627K7mSLkCvrbLYa3+9wTefvEb6k ZBlQvfV2Tqr8Y9CKC1rmX2SWOKmGiZe9AaWjBSSZNlq56nvzkIdWYfydEuADTDVJb2xo nX4C6lTd3zCfbFoocUHUxXo8HgIp/tgYXH0LOxvS47QyrKqtIH4DYx9a8+LcZUBk9sfU N2zU8ec9H4KiYOEHSPXQeh2qmkuR6CSdUQsuoo5v/jiUi75Bxxv+IIaSG83x5554Ags2 TgeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Pcd1m2NC4VwbRyf9cPBN7WkrmDonr/2ABTYfeew9jPY=; b=PqxU5e1QctXtRGj9lkFLhwK0PQYTWr2Y0yQdl9Ivp+SJHCt28J7N3+/vCTIx/BO52l JfkZ38n7P+d5oGgcPafTuyicRHYDTKxllNNvrufSsNdivbXXD7lsmtUTF9vggNpH3Dk1 g3ere61tSouJefOZIODSzwFzCjCYHB0tMS6qEw2tZyAAm1ue85B8twqZdNawYlOCdDZL KEH6Zj8cH2sGCf+3alNoyc4iZvgFhdWVyoFgPBXguBkKsLxwmYPDoq1cQawSSdDrAtHI xHDvvBXLSkFbtVeUlAHFFG1lle2Djd8bHIPRkJDeSELGfy4DDc8A12o/Ubezjnb8aO/t QgVA== X-Gm-Message-State: AOAM532no2OXb3r2y7ICDK2fz9pIMKZf4I/hFgokL011BD8zW3xrZJcm Al+xBluIi7hMtjEVdfAtY/6ubQ== X-Google-Smtp-Source: ABdhPJynHBfUpYQuzfXBY3e8a/lq8gZyU3GwdQn1/XmZ7LYejoHVvysiMBG0a4wWOsfgms3ZiwiQ7g== X-Received: by 2002:a17:906:1a4b:: with SMTP id j11mr5944ejf.55.1615404220021; Wed, 10 Mar 2021 11:23:40 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 7/7] gitlab: add build-user-hexagon test Date: Wed, 10 Mar 2021 19:23:31 +0000 Message-Id: <20210310192331.29284-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210310192331.29284-1-alex.bennee@linaro.org> References: <20210310192331.29284-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x635.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , f4bug@amsat.org, Wainer dos Santos Moschetta , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We special case this as the container with the cross compiler for the tests takes so long to build it is manually uploaded into the registry. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20210305092328.31792-7-alex.bennee@linaro.org> --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b23364bf3a..5625265ef8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -421,6 +421,17 @@ build-user-static: CONFIGURE_ARGS: --disable-tools --disable-system --static MAKE_CHECK_ARGS: check-tcg =20 +# Because the hexagon cross-compiler takes so long to build we don't rely +# on the CI system to build it and hence this job has no dependency +# declared. The image is manually uploaded. +build-user-hexagon: + <<: *native_build_job_definition + variables: + IMAGE: debian-hexagon-cross + TARGETS: hexagon-linux-user + CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg + MAKE_CHECK_ARGS: check-tcg + # Only build the softmmu targets we have check-tcg tests for build-some-softmmu: <<: *native_build_job_definition --=20 2.20.1