From nobody Sun Nov 24 04:05:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1729764310; cv=none; d=zohomail.com; s=zohoarc; b=RwvFRmiytVsGrksrTpYo7hQOn9NB6JrIRSgEd3fQvsnBEVBxvyaD7nSqcASCvlbqxQzEJ7xX2lkoiKnKrNl5bb2oTCrb3TaVnAcP/LfrLPWm3t7x8+8cDEaOD3xXl7QqsBBZp4lgCLtI3dH73Hpr5kSoRcUjPxqezgM4sMCU7fI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729764310; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sVlXuuK1xEQOAVzZHIn4SmM6Td3cV8czZgbgjjn4N1k=; b=iBMVZ8+H8cNmwf34r7OcjDdspdFBrANtuTFzIitbfPH4FoMjx90AVDdOrptAn4JxkzWwAL834GacTGnKGCRK0HdIVdEChpZKDf//qsBjCQnTG/Dae2EyQ8a6XSMItmHZq6mTyTuHTMtIg3c1Od4rSdpMeGBUduzSHps5O+zGY0w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 172976431063049.04066499113435; Thu, 24 Oct 2024 03:05:10 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.825104.1239349 (Exim 4.92) (envelope-from ) id 1t3uhw-00070N-LO; Thu, 24 Oct 2024 10:04:44 +0000 Received: by outflank-mailman (output) from mailman id 825104.1239349; Thu, 24 Oct 2024 10:04:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t3uhw-0006zs-Hb; Thu, 24 Oct 2024 10:04:44 +0000 Received: by outflank-mailman (input) for mailman id 825104; Thu, 24 Oct 2024 10:04:42 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t3uhu-0005hp-0w for xen-devel@lists.xenproject.org; Thu, 24 Oct 2024 10:04:42 +0000 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [2a00:1450:4864:20::533]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 620d4fbc-91ef-11ef-99a3-01e77a169b0f; Thu, 24 Oct 2024 12:04:40 +0200 (CEST) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5c96df52c52so839244a12.1 for ; Thu, 24 Oct 2024 03:04:40 -0700 (PDT) Received: from localhost.localdomain ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c72866sm5482506a12.95.2024.10.24.03.04.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 03:04:39 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 620d4fbc-91ef-11ef-99a3-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1729764279; x=1730369079; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sVlXuuK1xEQOAVzZHIn4SmM6Td3cV8czZgbgjjn4N1k=; b=Q8nrdOzGkK55Zmt2DPH5sQg8CdUGmhdInXPJyzy1C1oMbIqcZWnMLllmYCS/58tl3q XssAsKAqcHjJQVgorXXl/6NRQi1dVJnQjl2GOUU5sFv7J38pcsAlVmD24CSpJKnAunoH Xs3FHZQBj1+ZxXWxhWuCJmV69HYiaD+gFt8NM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729764279; x=1730369079; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sVlXuuK1xEQOAVzZHIn4SmM6Td3cV8czZgbgjjn4N1k=; b=gwLdybB/2NbnMaHoCV1YsbL2ZtRpu//Y7x30WOzjISaZBcwJ4dtHHSufyRUHE0mK4c ikw4ELglDhYSSKkBqjnlOXCFaAZpf0tlpT7lnnCQoQ9c4VQsY4RmISpSrxsGq7Pw3DYX e4UTrcA+kEbPAIyeZ+atGv/95rCKirIvM0viFbMhdG3qleRsst7+eRCUQ5t16hg5ta83 JdT6ptxjFAY9bNde4gQ8RdjbzDCSGtfiwLAVaRBb+dasFN8qXQTNpqQape6QVJg8cGI2 n/XFFLJcDxGryDquO+7/VWj9YwQs7id+UHgCQ+3p6hCn/fjz7GZRE9uf+09LvBzch7XR SDug== X-Gm-Message-State: AOJu0Yyvpkl+beRaAlzKUbsklazZdxOsAO1kq7DtjPEn3682Sg7amTAj 1eRpBIa8G5S3vWVkCdPT9mnr9Ti3GYm8bQxSwnYH9R9mbGPok851JGcWU3yEyxNISdsY55tdowg hETc= X-Google-Smtp-Source: AGHT+IFRyLmoJZ+UKlceAWsFPEGXV05Q3R+N3UCSgoAj/TGPHmJLMNKyBsWpxxsHg+yLoujSrU3D1A== X-Received: by 2002:a05:6402:280e:b0:5cb:7318:800d with SMTP id 4fb4d7f45d1cf-5cb8b26d8f1mr4678502a12.32.1729764279375; Thu, 24 Oct 2024 03:04:39 -0700 (PDT) From: Javi Merino To: xen-devel@lists.xenproject.org Cc: Javi Merino , Doug Goldstein , Stefano Stabellini Subject: [XEN PATCH v1 6/6] CI: Run the builds and tests that use the Debian 12 containers as a normal user Date: Thu, 24 Oct 2024 11:04:21 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1729764311629116600 Content-Type: text/plain; charset="utf-8" Use FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR so that GitLab CI clones xen using the user in the image, instead of as root[0]. In qemu-smoke-dom0*.sh and qemu-alpine-x86_64.sh, use fakeroot to create the rootfs images that untar a tarball that create character devices. cpio replicates the block and character devices, as well as preserving the uid and gid it sees in the current directory. fakeroot lets tar think that it is creating block and character devices, and all files are owned by root, but it is all smokes and mirrors for cpio. [0] https://gitlab.com/gitlab-org/gitlab-runner/-/issues/1736 Signed-off-by: Javi Merino --- Regarding building the rootfs, I have chosen to use a fakeroot subshell for the entire process. automation/scripts/qubes-x86-64.sh takes a different approach, it just uses fakeroot for the tar/cpio commands. I prefer to do it this way but I am happy to be overridden if `fakeroot -s ../save tar` and `fakeroot -i ../save cpio` are preferred. automation/build/debian/12-arm64v8.dockerfile | 5 ++++- automation/build/debian/12-x86_64.dockerfile | 5 ++++- automation/gitlab-ci/test.yaml | 4 ++++ automation/scripts/qemu-alpine-x86_64.sh | 4 +++- automation/scripts/qemu-smoke-dom0-arm64.sh | 7 +++++-- automation/scripts/qemu-smoke-dom0less-arm64.sh | 5 +++-- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/automation/build/debian/12-arm64v8.dockerfile b/automation/bui= ld/debian/12-arm64v8.dockerfile index 4da1b074aedb..c2617956ed77 100644 --- a/automation/build/debian/12-arm64v8.dockerfile +++ b/automation/build/debian/12-arm64v8.dockerfile @@ -10,6 +10,8 @@ RUN < ../init= rd.cpio.gz cd .. =20 # initrd.tar.gz is Dom0 rootfs +fakeroot <> etc/rc.conf # rebuild Dom0 rootfs find . |cpio -H newc -o|gzip > ../xen-rootfs.cpio.gz -cd ../.. +EOF +cd .. =20 cat >> binaries/pxelinux.0 << EOF #!ipxe diff --git a/automation/scripts/qemu-smoke-dom0-arm64.sh b/automation/scrip= ts/qemu-smoke-dom0-arm64.sh index 4d22a124df11..8f9bfd620ee3 100755 --- a/automation/scripts/qemu-smoke-dom0-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0-arm64.sh @@ -27,8 +27,10 @@ cd initrd find . | cpio --create --format=3D'newc' | gzip > ../initrd.cpio.gz cd .. =20 -mkdir -p rootfs +fakeroot <> etc/rc.conf find . |cpio -H newc -o|gzip > ../xen-rootfs.cpio.gz -cd ../.. +EOF +cd .. =20 # XXX QEMU looks for "efi-virtio.rom" even if it is unneeded curl -fsSLO https://github.com/qemu/qemu/raw/v5.2.0/pc-bios/efi-virtio.rom diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh b/automation/s= cripts/qemu-smoke-dom0less-arm64.sh index 83e1866ca6c5..2d60f22d68b7 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh @@ -112,7 +112,8 @@ find . | cpio --create --format=3D'newc' | gzip > ../bi= naries/initrd cd .. =20 # DOM0 rootfs -mkdir -p rootfs +fakeroot <> etc/rc.conf find . | cpio -H newc -o | gzip > ../binaries/dom0-rootfs.cpio.gz -cd .. +EOF =20 # ImageBuilder echo 'MEMORY_START=3D"0x40000000" --=20 2.45.2