From patchwork Wed Mar 10 19:23:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 396779 Delivered-To: patch@linaro.org Received: by 2002:a17:906:a383:0:0:0:0 with SMTP id k3csp608001ejz; Wed, 10 Mar 2021 11:35:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHV77LRzy4aYYMx3KSf62MXxzkfXvWbkCMlibbYTz4yi+yprwPheM4KWwggFrTCBgJ/H6u X-Received: by 2002:a05:620a:12d1:: with SMTP id e17mr4238991qkl.203.1615404954928; Wed, 10 Mar 2021 11:35:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615404954; cv=none; d=google.com; s=arc-20160816; b=XuLB6jVZJHJjSA3yKEDcj93QVf9emv0UdMXW5ji9vU0fXa3WUzs/sofVMow0HaClqt uwECfIhssNGQ+EFIFGcpeoAwkbQ2k3tTpHYB1hUTYpP0a6g38g1nW0Ao6VivfUvT9wet jR+vCMx/1vAO0Gf5aLkatihZ6QBTisDVrnD28Q65vbETqEfnpd3+/BWdwagf7z+N7SPX 9FoXQNM5rKITPPRUm4gwiQwJso1HqySgA1syNEeI3YpBDcbF6Mi6yBssp3rukZYiJ6Qv jAekIE323/3/suNscU53srwznsMQuUyJpZpSbGjZ+fGZB0FYHO46mxl2a9Ut3Q/2YwSi FKNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=3jUznPzvzYHkJS30t4l+mHbEcaUIGUHIWC+isF9wstk=; b=jG6trajao4kpSLUm1biYfgtMtXg/qVai9+PMv9G3C1StqEQkF1DzgjhfD4qkmHVByV sZwuvrDXtg8EloIzSMwebDKxtCJ3BUQ62HejXGuS4l2CFj9rRir1T/H58RXHlcAwemkC JD47Lje+vHuuTO4slh82A/7pUCCx0odlCgfbVKnrrx5pssncDJC6l8mfa0yujDM8tfe5 ov78JBodI1NWFsk28lFKbhqZsfRvI7u6936IJG8aqa+O8PVsDyAiSi13bDOKxIZmvbdU 7YrjUQOu4q+Na70Y6uWSJzcpzerlVLF/vgUpxGAmtSQvxx+2e0t1oFKjJZ9l2XcM4snT Lj4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NFppSKFR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g9si306164qkk.143.2021.03.10.11.35.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Mar 2021 11:35:54 -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=fail header.i=@linaro.org header.s=google header.b=NFppSKFR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4cc-0006vs-7a for patch@linaro.org; Wed, 10 Mar 2021 14:35:54 -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) 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-Received: by 2002:aa7:c618:: with SMTP id h24mr5011854edq.358.1615404213746; Wed, 10 Mar 2021 11:23:33 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud?= =?utf-8?b?w6k=?= , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée --- tests/docker/docker.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.20.1 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 = _get_so_libs(args.executable) if libs: for l in libs: - tmp_tar.add(os.path.realpath(l), arcname=l) + so_path = os.path.dirname(l) + name = os.path.basename(l) + real_l = os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name)) + pass # Create a Docker buildfile df = StringIO() From patchwork Wed Mar 10 19:23:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 396775 Delivered-To: patch@linaro.org Received: by 2002:a17:906:a383:0:0:0:0 with SMTP id k3csp602368ejz; Wed, 10 Mar 2021 11:27:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAm+U+wAQJyg+39xo2USJzLmTn1kRJObFYghaKlxeNRjzKR6cHH9I5v6zhDxPpP8DPkGuZ X-Received: by 2002:ac8:44ca:: with SMTP id b10mr4116831qto.293.1615404436389; Wed, 10 Mar 2021 11:27:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615404436; cv=none; d=google.com; s=arc-20160816; b=TX5jAd9W5I/CAh4F4L0yWBFZ2BRTINsfFNNxfyE+bJGRBcpBRWSVuJSG95EWlTD3+l LDcxsi7w5u+Cal7gVqaSk2yG8VxWK6g/X11uWTgY0aLMp+XBHEqKkYNJabM4NI71sT0r ohqYO4HveTXvZfjgEF+yfsyFVJSMvs1sgv7sIlv8wBTGNYeb7zGCT6ohfYWEAe1BnqnS ktwVc+V+ULqe9W9hr5sOVUKAFcgkHguyqtkN1SN6Osybb4R7fbSSSH24qvzO7hJcG91v YMtBrNv9JOEJSCtgH1EmSBiMSc1IM+H0LqQbmHvWMhmTaW/DbNhxTDW5zduYY2JomXg+ uO7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=3cpP5ZojDuDn/CAqL7XfB+7+n/MJmTsO9r9UuhC5UGQ=; b=07KSoIrzXCV9ri6ADuHoyINGfZmhJ36fDr9fetWwSU+mhRT1YlM23IZtCmKMFoB/Al 5o2VGV4At3K18H72oIey54TGUED45aK9S9ZEYFTJ8cn8vdei2XjfZEjritFWpEXJxf+b WQ6CXBFXbwEB+twHRlVW8fMVkL6arvB3yTk0LfIzemIaJkrNpSPYSKFbix4BKUF2jXwd wCU5Af2WmarpUMeauW26er80lY/VRSKiS15+04OESZAECNtutyASDpgyFFkVDFRRg7B8 UUvsediibE8oVqx31hrc/Ioch80pbRwMR2quo/l4q7zcvZe85/bRq7R+oPWQgF7bYlPp UH/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="m/BOXJPY"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 13si197549qty.170.2021.03.10.11.27.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Mar 2021 11:27:16 -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=fail header.i=@linaro.org header.s=google header.b="m/BOXJPY"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:46044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4UF-0006Cu-J4 for patch@linaro.org; Wed, 10 Mar 2021 14:27:15 -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) 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-Received: by 2002:aa7:d7da:: with SMTP id e26mr5073445eds.269.1615404214437; Wed, 10 Mar 2021 11:23:34 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud?= =?utf-8?b?w6k=?= , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We're going to extend the abilities of the command shortly. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 2 +- tests/docker/docker.py | 56 ++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 28 deletions(-) -- 2.20.1 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="Image Tag") - parser.add_argument("executable", + parser.add_argument("--executable", help="Executable to copy") def run(self, args, argv): @@ -532,35 +532,37 @@ def run(self, args, argv): tmp = tempfile.NamedTemporaryFile(suffix="dckr.tar.gz") tmp_tar = TarFile(fileobj=tmp, mode='w') - # 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 = _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=ff) - - # Add any associated libraries - libs = _get_so_libs(args.executable) - if libs: - for l in libs: - so_path = os.path.dirname(l) - name = os.path.basename(l) - real_l = os.path.realpath(l) - try: - tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) - except FileNotFoundError: - print("Couldn't add %s/%s to archive" % (so_path, name)) - pass - # Create a Docker buildfile df = 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 = _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=ff) + + # Add any associated libraries + libs = _get_so_libs(args.executable) + if libs: + for l in libs: + so_path = os.path.dirname(l) + name = os.path.basename(l) + real_l = os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name)) + pass + + df.write(u"ADD . /\n") df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8")) From patchwork Wed Mar 10 19:23:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 396778 Delivered-To: patch@linaro.org Received: by 2002:a17:906:a383:0:0:0:0 with SMTP id k3csp605697ejz; Wed, 10 Mar 2021 11:32:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWeDfuSXuVGQmUP/xeTuPWgXhn9BjdpjkPGaOK62MF7q038YiJ2amlIYssJrjTMFZHREVA X-Received: by 2002:a9f:2b8e:: with SMTP id y14mr3256189uai.8.1615404735869; Wed, 10 Mar 2021 11:32:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615404735; cv=none; d=google.com; s=arc-20160816; b=V/VLuqBfSw95PyhJV+chrZuxigf5HlJESg6LhjOh5K5PRBC02ay8W2oYoGML+p+oxj Fw/GMwYEe27jEJ/l94yVRcnn/cBTysgeXImAA3RpnSvJDg8Pyxpm/l0c7VgVW/ZzdqP8 zQ57CaKmlAC8FEudLb4hpYRMAsyJ+VMDTahMslZ0qNbmvn0ox+k3+wqdIZCqj3w6MUoa RTvJnpmwXgEZk1DnJNaC0NMoHyF2daIeaclyRIAIgzqwFhTwlQmChmgMpxtKB4YPcfhD zAiy/L2k1LsF3eaOlkp29ievGppmuAiUYfVY3zVa+ayZKSdKKrbwvpcEIDNZkxDC8LVI K4dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=MFa+cdC9IBoTS22ijLymreQbHtfFC8aWs/cXqoq0jLU=; b=Iqe5Vm6esQ5A69bTMa0XjubtLLPauUBEMN7OoNptK2Gqauy/McADrIUX+4HmHPlsjk LoFqR3nHd4hbilXhUrTpB0+ZIyCeix2CezjtU6oNjg30EOxCDnRNmbC2femJoAQGJxKs x1nStVyvjDuGH6FcrP1j5MxjANII6jAD7EGce2twhdRV+72Q970cDki+ceJqxhsWNnfW EZElln2T/2TSr74meR1iYHljcv/1UCU2WXdA8IDn89dKGVPYT5PUPU+RK9Gw6HteFrE0 2wIMdhhLCALBw7isLOJx7fyTdXS9xW4TLbSmfnndfNKWx3ewvrNceKmYwm+XQ1pyF/Qp p5yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SZaqtvYB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t11si31296vko.52.2021.03.10.11.32.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Mar 2021 11:32:15 -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=fail header.i=@linaro.org header.s=google header.b=SZaqtvYB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4Z4-0002YY-UF for patch@linaro.org; Wed, 10 Mar 2021 14:32:14 -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) 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-Received: by 2002:a17:906:75a:: with SMTP id z26mr39380ejb.22.1615404217007; Wed, 10 Mar 2021 11:23:37 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud?= =?utf-8?b?w6k=?= , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée --- tests/docker/docker.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) -- 2.20.1 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): class UpdateCommand(SubCommand): - """ Update a docker image with new executables. Args: """ + """ Update a docker image. Args: """ name = "update" def args(self, parser): @@ -525,6 +525,9 @@ def args(self, parser): help="Image Tag") parser.add_argument("--executable", help="Executable to copy") + parser.add_argument("--add-current-user", "-u", dest="user", + action="store_true", + help="Add the current user to image's passwd") def run(self, args, argv): # Create a temporary tarball with our whole build context and @@ -564,6 +567,13 @@ def run(self, args, argv): df.write(u"ADD . /\n") + if args.user: + uid = os.getuid() + uname = 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 = BytesIO(bytes(df.getvalue(), "UTF-8")) df_tar = TarInfo(name="Dockerfile") From patchwork Wed Mar 10 19:23:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 396776 Delivered-To: patch@linaro.org Received: by 2002:a17:906:a383:0:0:0:0 with SMTP id k3csp602474ejz; Wed, 10 Mar 2021 11:27:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsAzzoBbP4w/qvhZ2Kri20Zrr0ghB0WfPm2QM1XWgta8q/HJ6zj32ROroLCwzskisyYO9Z X-Received: by 2002:a37:4d86:: with SMTP id a128mr4192612qkb.115.1615404447389; Wed, 10 Mar 2021 11:27:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615404447; cv=none; d=google.com; s=arc-20160816; b=Cb80TW1mI2eOa59PXNdysFyiykQa2m2UbEXrfVBYRafKwlFwwMCNpF7V0+Eom9pVHC FGWK55JiCAhDDqg9HcgvNLQWaS/ifNunbqqmiEmsxwAgOsyKRzMIrUDkZ2X9ZxF6sB5P oJj9PxOBlgQECwugkUziTuRCxAo7YpcX6kG2YR+FlveX9RLTTUuGx0j2Y5V5chYlvhNk xC/EeEg2w+oOT65ApUwtGQ+80bduSY6ZwVhHsAvkk7h9EHP/0KGY2iJX1tgGTm84T1WZ ugkoH2aQiXOz2p4ipPFxasdztrZJhV7UW+7tPHuQazI81iqnoe/OK3ZjuXGgMLcg91SV xccw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=KGrYzIufJSpHy5l9wMOv7nypCu9GhpL0NWYqpZ6BI7Q=; b=HiBR3wHMEM+6emZDlKjyNKSMAoujq4RhsOVNEIUfu2SAL7Iq5UCgZNJpQbtbsY2V1M ZkLxon8LS8WwgK+0jL7OJTed6XL77xvgmSXSC+gVPPVzbM84VgM1JQRxVLR4uq7Xyw6B knwFJc86t4KlNWqf7NL8NsuKZ5G2K3dbyvaTzWev/uMq1m8Bc3naiAMZfv+owmXYuIB2 OZMx/WkPbykNNwTTjwmqlIzAi9usxh9fmG2SyAa6YuVLj60E2KbZkgi1r7+sJ0wlmYfn j0PdFabwKucX5XvYx5sJFy/4fbQPR5J3GVwCxXWRDD7tNVaYE+xp+Q4wvYOqwqLs5JlU 8CQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WhfDZF7p; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o6si240662qtl.62.2021.03.10.11.27.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Mar 2021 11:27:27 -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=fail header.i=@linaro.org header.s=google header.b=WhfDZF7p; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:46194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4UQ-0006Kc-MY for patch@linaro.org; Wed, 10 Mar 2021 14:27:26 -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) 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-Received: by 2002:a17:906:18aa:: with SMTP id c10mr25632ejf.248.1615404219070; 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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud?= =?utf-8?b?w6k=?= , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This simply wraps up fetching a build from the registry and tagging it as the local build. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé 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): return 0 +class FetchCommand(SubCommand): + """ Fetch a docker image from the registry. Args: """ + name = "fetch" + + def args(self, parser): + parser.add_argument("tag", + help="Local tag for image") + parser.add_argument("registry", + help="Docker registry") + + def run(self, args, argv): + dkr = Docker() + dkr.command(cmd="pull", quiet=args.quiet, + argv=["%s/%s" % (args.registry, args.tag)]) + dkr.command(cmd="tag", quiet=args.quiet, + argv=["%s/%s" % (args.registry, args.tag), args.tag]) + class UpdateCommand(SubCommand): """ Update a docker image. Args: """ From patchwork Wed Mar 10 19:23:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 396777 Delivered-To: patch@linaro.org Received: by 2002:a17:906:a383:0:0:0:0 with SMTP id k3csp604202ejz; Wed, 10 Mar 2021 11:30:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnt1aOyoU6F6ZmhJNjR/GoWh/vOxTepfDZBvNNxhB0F01j6qSm+i/S+ejd//Xpgr3ksSQy X-Received: by 2002:a37:6348:: with SMTP id x69mr4179309qkb.154.1615404615856; Wed, 10 Mar 2021 11:30:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615404615; cv=none; d=google.com; s=arc-20160816; b=J4zlkW1jm4kXfTrX0puslvtSwkOy5rFubfXdQYODBYZpCz4nE/GLK8WdTNRcc1dRO7 BVunbHJsjAuWVkmXB+Kn4TgKHwS5+6Z/R4uOUSxtVKy6s3oopQgVyvP6Z3+mCwyAdBmu Kuh5LvEfrWawbUIAmZ8H78A73nQC2ZjUAMPXFGj0WNtwdAbvdSOo6ocVFd1UuhdYaKQC CQnuwS8SJquqRHJ+190pOK/quATB3YSbT23TYXdWWG/lXL6mLx2eRbohx2CYSUq8Rjeq uev85GpgPLmILCIFrIV1FAd1h7makH54rJRsLgfICOP81r9o0mBo94TuPOGAce/5ANuW TJ4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=kMSl2nUioQRSggV946FzlETeW29Qa6scCLbuYk6OMBk=; b=TeuBEjqALdN+DTNHssP/pdzJbDwKlQkf7mTfYdnQb1xGFhTYQOHOJm0q73DEKys2BO Eh0e/ywMaUUZebgg2UK6hf0JrHkTJCT5I4dB4VafIAjZJgaebFVCJo/2711wD0qXvAOM gUycgL/IXgzLMHlPWYZz3EoXFYjRyWPJjdz3tdhg3FhOakqYstHIDJUZJHcD9MrvgAgf CRPjGkPN73BFbojypINMquHQs47tEjmk9fcANHP2rz2MUn1SOqfzlO9+gTYV8OsjEgnl sUoNgZMvTJwR0zcq2KHapPzZ+xxe8kFX0ZgJX3nqwDDcE//tal7YBblk4XUzCuCdm+V4 Soxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hj+BkBKm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t20si204803qtw.378.2021.03.10.11.30.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Mar 2021 11:30:15 -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=fail header.i=@linaro.org header.s=google header.b=hj+BkBKm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4X9-0002eY-23 for patch@linaro.org; Wed, 10 Mar 2021 14:30:15 -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) 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-Received: by 2002:a17:906:32da:: with SMTP id k26mr5226475ejk.483.1615404222674; Wed, 10 Mar 2021 11:23:42 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud=C3=A9?= , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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=1 NOCACHE=1 J=30 docker tag qemu/debian-hexagon-cross registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross docker push registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross 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ée Cc: Alessandro Di Federico Cc: Philippe Mathieu-Daudé 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 -- 2.20.1 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 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 +# +# 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-cross.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/docker/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=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive 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/3d8149c2a1228609fd7d7c91a04681304a2f0ca9.tar.gz +ENV MUSL_URL https://github.com/quic/musl/archive/aff74b395fbf59cd7e93b3691905aa1af6c0778c.tar.gz +ENV LINUX_URL https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.18.tar.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/sources.list +# Install QEMU build deps for use in CI +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt build-dep -yy --arch-only qemu +COPY --from=0 /usr/local /usr/local +ENV PATH $PATH:/usr/local/bin/ diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.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-toolchain.sh @@ -0,0 +1,141 @@ +#!/bin/bash + +set -e + +BASE=$(readlink -f ${PWD}) + +TOOLCHAIN_INSTALL=$(readlink -f "$TOOLCHAIN_INSTALL") +ROOTFS=$(readlink -f "$ROOTFS") + +TOOLCHAIN_BIN=${TOOLCHAIN_INSTALL}/bin +HEX_SYSROOT=${TOOLCHAIN_INSTALL}/hexagon-unknown-linux-musl +HEX_TOOLS_TARGET_BASE=${HEX_SYSROOT}/usr + +function cdp() { + DIR="$1" + mkdir -p "$DIR" + cd "$DIR" +} + +function fetch() { + DIR="$1" + URL="$2" + TEMP="$(readlink -f "$PWD/tmp.tar.gz")" + wget --quiet "$URL" -O "$TEMP" + cdp "$DIR" + tar xaf "$TEMP" --strip-components=1 + rm "$TEMP" + cd - +} + +build_llvm_clang() { + fetch "$BASE/llvm-project" "$LLVM_URL" + cdp "$BASE/build-llvm" + + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${TOOLCHAIN_INSTALL} \ + -DLLVM_ENABLE_LLD=ON \ + -DLLVM_TARGETS_TO_BUILD="Hexagon" \ + -DLLVM_ENABLE_PROJECTS="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=${HEX_SYSROOT} +EOF +} + +build_clang_rt() { + cdp "$BASE/build-clang_rt" + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_CONFIG_PATH="$BASE/build-llvm/bin/llvm-config" \ + -DCMAKE_ASM_FLAGS="-G0 -mlong-calls -fno-pic --target=hexagon-unknown-linux-musl " \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_C_COMPILER="${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang" \ + -DCMAKE_ASM_COMPILER="${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang" \ + -DCMAKE_INSTALL_PREFIX=${HEX_TOOLS_TARGET_BASE} \ + -DCMAKE_CROSSCOMPILING=ON \ + -DCMAKE_C_COMPILER_FORCED=ON \ + -DCMAKE_CXX_COMPILER_FORCED=ON \ + -DCOMPILER_RT_BUILD_BUILTINS=ON \ + -DCOMPILER_RT_BUILTINS_ENABLE_PIC=OFF \ + -DCMAKE_SIZEOF_VOID_P=4 \ + -DCOMPILER_RT_OS_DIR= \ + -DCAN_TARGET_hexagon=1 \ + -DCAN_TARGET_x86_64=0 \ + -DCOMPILER_RT_SUPPORTED_ARCH=hexagon \ + -DLLVM_ENABLE_PROJECTS="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=${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + CROSS_COMPILE=hexagon-unknown-linux-musl \ + LIBCC=${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CROSS_CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \ + ./configure --target=hexagon --prefix=${HEX_TOOLS_TARGET_BASE} + PATH=${TOOLCHAIN_BIN}:$PATH make CROSS_COMPILE= 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=../build-linux ARCH=hexagon \ + KBUILD_CFLAGS_KERNEL="-mlong-calls" \ + CC=${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + LD=${TOOLCHAIN_BIN}/ld.lld \ + KBUILD_VERBOSE=1 comet_defconfig + make mrproper + + cd "$BASE/build-linux" + make \ + ARCH=hexagon \ + CC=${TOOLCHAIN_BIN}/clang \ + INSTALL_HDR_PATH=${HEX_TOOLS_TARGET_BASE} \ + V=1 \ + headers_install +} + +build_musl() { + cd "$BASE/musl" + make clean + CROSS_COMPILE=hexagon-unknown-linux-musl- \ + AR=llvm-ar \ + RANLIB=llvm-ranlib \ + STRIP=llvm-strip \ + CC=clang \ + LIBCC=${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \ + ./configure --target=hexagon --prefix=${HEX_TOOLS_TARGET_BASE} + PATH=${TOOLCHAIN_BIN}/:$PATH make CROSS_COMPILE= 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 From patchwork Wed Mar 10 19:23:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 396781 Delivered-To: patch@linaro.org Received: by 2002:a17:906:a383:0:0:0:0 with SMTP id k3csp610226ejz; Wed, 10 Mar 2021 11:39:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhSwxzwXqVsjzKhNsggrEvsU2VTUfTTSwSjHIzr+tKhicA4vpD1qDtDJm2EkZlTv0YnqJJ X-Received: by 2002:a05:6214:20ed:: with SMTP id 13mr4429432qvk.34.1615405180263; Wed, 10 Mar 2021 11:39:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615405180; cv=none; d=google.com; s=arc-20160816; b=GbBbzNnhoa+X3AMxbM4StEJ6coljWfRz9SjEu/SIkPjf3daR0nVSao6KsaH25mprow vE2hqfotWLoaBuP2q+H2shPiRLvmig7d2T3STg5Z0nVYYgVWC248VBMk6F0debKbg0WZ PB7eiTICpi8yZfJPYHmINrr/UTDz7Eo/uW1HHPWxjhXN8BCmrwqfYv5C4FdzjpD9YdNg M++965ewXqIcdPUmDAkULuuLEEpvg4YM/2eVNrZgaaeX5qvpSK+6rLqo077ugzJFDLYr z+ykc+99TeYRg3oS2vgZmc2cuVOIKP3Usxk1M0jcIdrMk8YRoy9/W8AU6NTkmyBXc8y1 +ICA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=hIWJZmL4ryUgyEw+W352gXcuQhd67mjmkYPqHcAbcc4=; b=puURr4udw1ccJifnwn6g7Bt/+DC2M6D5WmvZLxSkQ1eqirDtGJtQR/8x9tMqz5duEQ cd9lTOQh/CrAzNqMZfgq8TvKbJd7VKzV+NgR0hCjmHuu0Q2/4kLh3kLPsa1E1R4jTwG/ x/Wp71TXCcfePgQop+7gXNSw0c9/5C6ttZ4w7pN3QidcYAtTy90Iar45vxxuqL9u5kjN 1YH4JOsYCOxhDplj50V3zejJnRxV2uW7gDuA4vQWpZFK9FdFQIndETYodp8Vlwmv/ODc 6Q4+nmjDc9NbSxW0Vsa0v6LTg2TyexptZbOfN0wZ3KGVgb+l4l+xp82hw7ANTIrtO9/X b3+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="v4k/ruww"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r8si141507qvq.6.2021.03.10.11.39.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Mar 2021 11:39:40 -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=fail header.i=@linaro.org header.s=google header.b="v4k/ruww"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4gF-0002Bh-H2 for patch@linaro.org; Wed, 10 Mar 2021 14:39:39 -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) 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-Received: by 2002:a05:6402:c:: with SMTP id d12mr4964800edu.100.1615404221964; Wed, 10 Mar 2021 11:23:41 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alessandro Di Federico [PMD: Split from 'Add Hexagon Docker image' patch] Signed-off-by: Alessandro Di Federico Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée 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(+) -- 2.20.1 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=fedora-cris-cross container_cross_cc=cris-linux-gnu-gcc ;; + hexagon-*) + container_image=debian-hexagon-cross + container_cross_cc=hexagon-unknown-linux-musl-clang + ;; hppa-*) container_image=debian-hppa-cross container_cross_cc=hppa-linux-gnu-gcc From patchwork Wed Mar 10 19:23:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 396782 Delivered-To: patch@linaro.org Received: by 2002:a17:906:a383:0:0:0:0 with SMTP id k3csp610253ejz; Wed, 10 Mar 2021 11:39:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3BzFxJktLK1mKUNQptjyyQK52O4zxGEtUEjnoOZJ7bPf8wDTf5f+0b6Hk2h2s8LuLcaDi X-Received: by 2002:ad4:542b:: with SMTP id g11mr4630050qvt.47.1615405183470; Wed, 10 Mar 2021 11:39:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615405183; cv=none; d=google.com; s=arc-20160816; b=fQEF9o7LlK4UbcTqjkMfGXRGxznCh9NxrZJj6cViz73km+TijJS3m5L9AeocSU5Uud hsFFgNWYnjfZFHH7VPu+HIfC3JCVRfcmESiDSjN0I+iFhPGQost4BYsEc4Xlb1Y8nZL7 NK3tbIsR9xXrD+q8xvxDPjxXR7N/pC+jKx3LZEM50Lhg1lKrTLv27lpuns355Po55qea iC3At3LPAymU7N9MNCZFEgnwE7Fyh9QieHpxHOuymNiobnYoG813tdhBjHbWOfSsLe5K lrehw8yJeAXxPBxyAHmZWwEs2wmtnSpI08f6BUEQ2m0ntQOD6LEiEYGGFWXzCfNPwTJd 2EnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Pcd1m2NC4VwbRyf9cPBN7WkrmDonr/2ABTYfeew9jPY=; b=XtnrpZlyy+/eJq8hbP2mXn27bkGUv1MQIR7zAqomTpA590rLo9vWuqMlszdM2mbf+J o5tLYrk1qKnWLY/07c30vkcyVIraDKh7iJVx7OwyU4uuRjQrUmlZ8MJIzVhsYw5Fu1y5 98+FPhbLwdS9w1P/maKAWkTkPkQqfyxQYaUcnf0W87OXa/ndjCGyY7hHywVBifk662F7 iUNyVxk3v9hxasleeSGXqEFcFwkJMcNL8oD15U8VOawdLsN19FBNRWgKTWMedUxKQ/UE LvDyNtfanGoytVbNyNAbP4I091YL8uW+Av3WSBM8oYjB4LB7iKtiQuWtwyLOrpWHcp8p Hmjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=y3OX232Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l9si126547qvp.71.2021.03.10.11.39.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Mar 2021 11:39:43 -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=fail header.i=@linaro.org header.s=google header.b=y3OX232Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK4gI-0002HB-PU for patch@linaro.org; Wed, 10 Mar 2021 14:39:42 -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) 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-Received: by 2002:a17:906:1a4b:: with SMTP id j11mr5944ejf.55.1615404220021; 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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud=C3=A9?= , f4bug@amsat.org, Wainer dos Santos Moschetta , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20210305092328.31792-7-alex.bennee@linaro.org> --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.20.1 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 +# 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