From nobody Mon Apr 29 02:14:26 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; 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 ARC-Seal: i=1; a=rsa-sha256; t=1588271270; cv=none; d=zohomail.com; s=zohoarc; b=OvWAUpFM3lzOarW9m8BgwrwwcxR6hjUpWcWywB/QObFXNSaGKniccrmpbqsF4bqUbVNT6PZpWC5rOShFWI0Hhm2Ooi/gnP624xV2kPxOpsOE73bF+5k5yAfsrt5wITveufJpR5R6UjufFwG1Fa8eBaXH3zsuLw34gslAwLbA+MI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588271270; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y0r9d+rtGVk9XjtjF5aiw0t1EutMCn5WNHQILyTSsx4=; b=RbChJqGNEHUP1ZU+ho2ZZkrFoG6WJHklVBSkirq45eNwDAAX78kDIlH0yPZ75yIid2kduSE9Qbrd7u1+it193AwbgI6ahhFhjFlHlKeyDA4g6Iv6rcPbbZYFjHpND7UWKDmUjNPHhyGCyRZGVB8lp6oVfzdhxO4wCvwwioQYjmg= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1588271270548856.531644037295; Thu, 30 Apr 2020 11:27:50 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jUDuG-0007wX-55; Thu, 30 Apr 2020 18:27:32 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jUDuE-0007wP-Ol for xen-devel@lists.xenproject.org; Thu, 30 Apr 2020 18:27:30 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4005399a-8b10-11ea-b07b-bc764e2007e4; Thu, 30 Apr 2020 18:27:30 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CC9FBAC4A; Thu, 30 Apr 2020 18:27:28 +0000 (UTC) X-Inumbo-ID: 4005399a-8b10-11ea-b07b-bc764e2007e4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Subject: [PATCH 1/3] automation: update openSUSE Tumbleweed building dependencies From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Thu, 30 Apr 2020 20:27:28 +0200 Message-ID: <158827124854.19371.13461510910212179854.stgit@Palanthas> In-Reply-To: <158827088416.19371.17008531228521109457.stgit@Palanthas> References: <158827088416.19371.17008531228521109457.stgit@Palanthas> User-Agent: StGit/0.21 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Doug Goldstein Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" We need python3 (and the respective -devel package), these days. Signed-off-by: Dario Faggioli Acked-by: Wei Liu --- Cc: Doug Goldstein Cc: Andrew Cooper --- This patch was submitted already, but not as part of this series. Anyway, changes from v1: * add python3 instead of replacing python2 with it. --- I think the tumbleweed image in our registry needs to be updated. --- .../build/suse/opensuse-tumbleweed.dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automation/build/suse/opensuse-tumbleweed.dockerfile b/automat= ion/build/suse/opensuse-tumbleweed.dockerfile index 2676a87c85..084cce0921 100644 --- a/automation/build/suse/opensuse-tumbleweed.dockerfile +++ b/automation/build/suse/opensuse-tumbleweed.dockerfile @@ -56,6 +56,8 @@ RUN zypper install -y --no-recommends \ pkg-config \ python \ python-devel \ + python3 \ + python3-devel \ systemd-devel \ tar \ transfig \ From nobody Mon Apr 29 02:14:26 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; 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 ARC-Seal: i=1; a=rsa-sha256; t=1588271272; cv=none; d=zohomail.com; s=zohoarc; b=XBXHVPPPFrShKo3StdCrjsRBwSWpgObTJ+58B7hn8hfePvpeV20uPHeWNkkkPR0L2JeRacsr+D1KU/wO0nawNgvIysuCOU3rEaMSmC/mxQaDZrE/YqFdBvsvrf1fZwUbu1MrbimXItQgHyjK99ms659QcJQ8R8SitLb4tUCjI0w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588271272; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YlB2AXFjZzSUB5Q7mXP1/0B4krlKdWdWiqirlxjxemw=; b=FtLLRyeUnPompQBajqU87Gnl7tEI3aYPGfnmgx7eZxVNno8q6jVnSMbWtCopwWc51IwYsu0JCMB7JpZvjpgonSnrCEbsgaoo0zUmAR5TkKN5UJGKh9fpBsqiIIWvjxAlFZnAA0ou9U3mO2E3weLVtFZJZCNT3oYOl/YxKxwEZyk= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1588271272003837.8619119283884; Thu, 30 Apr 2020 11:27:52 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jUDuM-0007xq-HJ; Thu, 30 Apr 2020 18:27:38 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jUDuK-0007xQ-FE for xen-devel@lists.xenproject.org; Thu, 30 Apr 2020 18:27:36 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 429940b8-8b10-11ea-9a92-12813bfff9fa; Thu, 30 Apr 2020 18:27:36 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 800D1AC4A; Thu, 30 Apr 2020 18:27:34 +0000 (UTC) X-Inumbo-ID: 429940b8-8b10-11ea-9a92-12813bfff9fa X-Virus-Scanned: by amavisd-new at test-mx.suse.de Subject: [PATCH 2/3] automation: openSUSE distro names helpers for containerize. From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Thu, 30 Apr 2020 20:27:34 +0200 Message-ID: <158827125424.19371.11152490489435365073.stgit@Palanthas> In-Reply-To: <158827088416.19371.17008531228521109457.stgit@Palanthas> References: <158827088416.19371.17008531228521109457.stgit@Palanthas> User-Agent: StGit/0.21 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Doug Goldstein Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Dario Faggioli Acked-by: Wei Liu --- Cc: Doug Goldstein --- automation/scripts/containerize | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automation/scripts/containerize b/automation/scripts/container= ize index fbc4bc22d6..eb805bf96c 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -24,6 +24,8 @@ case "_${CONTAINER}" in _stretch|_) CONTAINER=3D"${BASE}/debian:stretch" ;; _trusty) CONTAINER=3D"${BASE}/ubuntu:trusty" ;; _xenial) CONTAINER=3D"${BASE}/ubuntu:xenial" ;; + _opensuse-leap|_leap) CONTAINER=3D"${BASE}/suse:opensuse-leap" ;; + _opensuse-tumbleweed|_tumbleweed) CONTAINER=3D"${BASE}/suse:opensuse-t= umbleweed" ;; esac =20 # Use this variable to control whether root should be used From nobody Mon Apr 29 02:14:26 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; 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 ARC-Seal: i=1; a=rsa-sha256; t=1588271276; cv=none; d=zohomail.com; s=zohoarc; b=eZPuiuwUD8tAS76XBGjS/99+AVKHNTYdE7TsWegB998NsPKznI2/JdoOTTNlXWWrD+LoD9y/FBSXG8RtnI9EjM7Gi1WDt2ZErbosqsdOqzHV/lFwYTOfkZ/EFZPNy1/Koh8h0KYm9nqBSl6Htlvj68Om0/dhHHyAb72a1CHKT84= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588271276; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=okc/tomatyXjzrnnIwIbNFYvzH7tIJBzQekRNfm9iMo=; b=k1NW4opTQ0j3ksHeqFL9M8iWa5fsxZDrDimxUSUeKQPFxH12g1dWwJyRba/0AqHskU+6JY+GKnfZYa023Km0/nNbjnInwkF1fMawmUISPoaeon8Cck1G31rdjf4bburRJijEDjHTr/Rq2fhkw44OG410LRV4hWE/Vi47/GCKZzk= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1588271276814629.5567074023706; Thu, 30 Apr 2020 11:27:56 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jUDuQ-0007zK-Qc; Thu, 30 Apr 2020 18:27:42 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jUDuQ-0007z6-48 for xen-devel@lists.xenproject.org; Thu, 30 Apr 2020 18:27:42 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 46be0406-8b10-11ea-b9cf-bc764e2007e4; Thu, 30 Apr 2020 18:27:41 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 24AABAC4A; Thu, 30 Apr 2020 18:27:40 +0000 (UTC) X-Inumbo-ID: 46be0406-8b10-11ea-b9cf-bc764e2007e4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Subject: [PATCH 3/3] automation: implement (rootless) podman support in containerize From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Thu, 30 Apr 2020 20:27:39 +0200 Message-ID: <158827125993.19371.14414402068069346455.stgit@Palanthas> In-Reply-To: <158827088416.19371.17008531228521109457.stgit@Palanthas> References: <158827088416.19371.17008531228521109457.stgit@Palanthas> User-Agent: StGit/0.21 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Doug Goldstein Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Right now only docker is supported, when using the containerize script for building inside containers. Enable podman as well. Note that podman can be use in rootless mode too, but for that to work the files /etc/subuid and /etc/subgid must be properly configured. For instance: dario@localhost> cat /etc/subuid dario:100000:65536 dario@localhost:> cat /etc/subgid dario:100000:65536 Signed-off-by: Dario Faggioli Acked-by: Wei Liu --- Cc: Doug Goldstein --- automation/build/README.md | 10 ++++++++++ automation/scripts/containerize | 17 +++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/automation/build/README.md b/automation/build/README.md index 8cda2b65a5..e1fb3124de 100644 --- a/automation/build/README.md +++ b/automation/build/README.md @@ -34,6 +34,16 @@ the default shell. There are several environment variables which the containerize script understands. =20 +- DOCKED_CMD: Whether to use docker or podman for running the containers. + podman can be used as a regular user (rootless podman), but for that + to work, /etc/subuid and /etc/subgid needs to containe the proper + entries, for such user. + docker is the default, for running with podman, do: + + ``` + DOCKER_CMD=3Dpodman ./automation/scripts/containerize make + ``` + - CONTAINER: This overrides the container to use. For CentOS 7.2, use: =20 ``` diff --git a/automation/scripts/containerize b/automation/scripts/container= ize index eb805bf96c..04b9fc7ba4 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -1,5 +1,14 @@ #!/bin/bash =20 +# +# DOCKER_CMD should be either `docker` or `podman`. +# +# if using (rootless) podman, remember to set /etc/subuid +# and /etc/subgid. +# +docker_cmd=3D${DOCKER_CMD:-"docker"} +[ "$DOCKER_CMD" =3D "podman" ] && userns_podman=3D"--userns=3Dkeep-id" + einfo() { echo "$*" >&2 } @@ -31,7 +40,7 @@ esac # Use this variable to control whether root should be used case "_${CONTAINER_UID0}" in _1) userarg=3D ;; - _0|_) userarg=3D"-u $(id -u)" ;; + _0|_) userarg=3D"-u $(id -u) $userns_podman" ;; esac =20 # Save the commands for future use @@ -49,8 +58,8 @@ tty -s && termint=3Dt # if [[ "_${CONTAINER_NO_PULL}" !=3D "_1" ]]; then einfo "*** Ensuring ${CONTAINER} is up to date" - docker pull ${CONTAINER} > /dev/null || \ - die "Failed to update docker container" + ${docker_cmd} pull ${CONTAINER} > /dev/null || \ + die "Failed to update container" fi =20 if hash greadlink > /dev/null 2>&1; then @@ -82,7 +91,7 @@ fi =20 # Kick off Docker einfo "*** Launching container ..." -exec docker run \ +exec ${docker_cmd} run \ ${userarg} \ ${SSH_AUTH_SOCK:+-e SSH_AUTH_SOCK=3D"/tmp/ssh-agent/${SSH_AUTH_NAME}"}= \ -v "${CONTAINER_PATH}":/build:rw \