From nobody Thu May 2 13:00:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1551369214079814.7939038249567; Thu, 28 Feb 2019 07:53:34 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 07735C9438; Thu, 28 Feb 2019 15:53:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C89701001DF7; Thu, 28 Feb 2019 15:53:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 81EBC4ED28; Thu, 28 Feb 2019 15:53:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1SFrU51006339 for ; Thu, 28 Feb 2019 10:53:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id E78261001DFA; Thu, 28 Feb 2019 15:53:30 +0000 (UTC) Received: from dhcp-17-75.lcy.redhat.com (unknown [10.42.17.75]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60E951001DF2; Thu, 28 Feb 2019 15:53:30 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 28 Feb 2019 15:53:16 +0000 Message-Id: <20190228155319.18373-2-berrange@redhat.com> In-Reply-To: <20190228155319.18373-1-berrange@redhat.com> References: <20190228155319.18373-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH v6 1/4] mappings: extend mapping to allow per-arch entries X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 28 Feb 2019 15:53:32 +0000 (UTC) For example to prevent Xen being installed on any s390x xen: deb: libxen-dev Fedora: xen-devel s390x-default: Or the inverse to only install Xen on x86_64 on Debian, but allow it on all archs on Fedora xen: Fedora: xen-devel x86_64-deb: libxen-dev Note that the architecture specific matches are considered after all the non-architcture matches. The dockerfile generator is updated to apply arch filtering based on the host arch. The ansible playbook is not actually implementing support for non-x86_64 architectures in this commit. It is just hardcoding x86_64, which is enough to ensure the changes in the mappings.yml file are a no-op initially. Signed-off-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 16 +++++++++- guests/playbooks/update/tasks/packages.yml | 32 +++++++++++++++++++ guests/vars/mappings.yml | 37 ++++++++++++++++++++-- 3 files changed, 81 insertions(+), 4 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 88bc945..d762721 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -20,6 +20,7 @@ import argparse import fnmatch import json import os +import platform import random import string import subprocess @@ -79,6 +80,16 @@ class Util: =20 return sorted(set(matches)) =20 + @staticmethod + def get_native_arch(): + # Same canonicalization as libvirt virArchFromHost + arch =3D platform.machine() + if arch in ["i386", "i486", "i586"]: + arch =3D "i686" + if arch =3D=3D "amd64": + arch =3D "x86_64" + return arch + =20 class Config: =20 @@ -302,6 +313,8 @@ class Application: self._inventory =3D Inventory() self._projects =3D Projects() =20 + self._native_arch =3D Util.get_native_arch() + self._parser =3D argparse.ArgumentParser( conflict_handler=3D"resolve", description=3D"libvirt CI guest management tool", @@ -540,7 +553,8 @@ class Application: ) =20 pkgs =3D {} - keys =3D ["default", package_format, os_name, os_full] + base_keys =3D ["default", package_format, os_name, os_full] + keys =3D base_keys + [self._native_arch + "-" + k for k in base_ke= ys] # We need to add the base project manually here: the standard # machinery hides it because it's an implementation detail for project in projects + ["base"]: diff --git a/guests/playbooks/update/tasks/packages.yml b/guests/playbooks/= update/tasks/packages.yml index 7fdfc45..01d4616 100644 --- a/guests/playbooks/update/tasks/packages.yml +++ b/guests/playbooks/update/tasks/packages.yml @@ -52,6 +52,38 @@ when: - mappings[item][os_name + os_version] is defined =20 +- name: '{{ project }}: Look up mappings (default with arch)' + set_fact: + temp: '{{ temp|combine({ item: mappings[item]["x86_64" + "-" + "defaul= t"] }) }}' + with_items: + '{{ packages }}' + when: + - mappings[item]["x86_64" + "-" + "default"] is defined + +- name: '{{ project }}: Look up mappings (package format with arch)' + set_fact: + temp: '{{ temp|combine({ item: mappings[item]["x86_64" + "-" + package= _format] }) }}' + with_items: + '{{ packages }}' + when: + - mappings[item]["x86_64" + "-" + package_format] is defined + +- name: '{{ project }}: Look up mappings (OS name with arch)' + set_fact: + temp: '{{ temp|combine({ item: mappings[item]["x86_64" + "-" + os_name= ] }) }}' + with_items: + '{{ packages }}' + when: + - mappings[item]["x86_64" + "-" + os_name] is defined + +- name: '{{ project }}: Look up mappings (OS version with arch)' + set_fact: + temp: '{{ temp|combine({ item: mappings[item]["x86_64" + "-" + os_name= + os_version] }) }}' + with_items: + '{{ packages }}' + when: + - mappings[item]["x86_64" + "-" + os_name + os_version] is defined + - set_fact: flattened: [] =20 diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index 8ff2f34..f856cda 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -7,9 +7,25 @@ # priority: # # - default -# - package format (deb, pkg, rpm) -# - OS name (CentOS, Debian, Fedora, FreeBSD, Ubuntu) -# - OS version (CentOS7, Debian9, FedoraRawhide, Ubuntu18 and so on) +# - package format +# - OS name +# - OS version +# - arch with default +# - arch with package format +# - arch with OS name +# - arch with OS version +# +# Valid package formats are +# - deb, pkg, rpm +# +# Valid OS names are: +# - CentOS, Debian, Fedora, FreeBSD, Ubuntu +# +# Valid OS versions are: +# - CentOS7, Debian9, FedoraRawhide, Ubuntu18 and so on +# +# The arch specific rules use a prefix "$ARCH-" where $ARCH +# is a libvirt arch name. # # So something like # @@ -27,6 +43,21 @@ # # will result in the 'ccache' package being installed everywhere except # for CentOS, where nothing will be installed. +# +# For example to prevent Xen being installed on any s390x +# +# xen: +# deb: libxen-dev +# Fedora: xen-devel +# s390x-default: +# +# Or the inverse to only install Xen on x86_64 only on debian +# based distros or Fedora +# +# xen: +# x86_64-deb: libxen-dev +# x86_64-Fedora: xen-devel +# =20 mappings: =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 13:00:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1551369218401605.3134252376489; Thu, 28 Feb 2019 07:53:38 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6AF473089E6C; Thu, 28 Feb 2019 15:53:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E3FB1973E; Thu, 28 Feb 2019 15:53:36 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BDB4C181A12B; Thu, 28 Feb 2019 15:53:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1SFrY6e006355 for ; Thu, 28 Feb 2019 10:53:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 44C4E1001DEA; Thu, 28 Feb 2019 15:53:34 +0000 (UTC) Received: from dhcp-17-75.lcy.redhat.com (unknown [10.42.17.75]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3350D1001DF6; Thu, 28 Feb 2019 15:53:31 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 28 Feb 2019 15:53:17 +0000 Message-Id: <20190228155319.18373-3-berrange@redhat.com> In-Reply-To: <20190228155319.18373-1-berrange@redhat.com> References: <20190228155319.18373-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH v6 2/4] mappings: filter arch usage for libnuma / xen X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 28 Feb 2019 15:53:37 +0000 (UTC) Both libnuma and xen are only available on a subset of architectures so need to be filtered accordingly. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Andrea Bolognani --- guests/vars/mappings.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index f856cda..4d06b83 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -310,6 +310,8 @@ mappings: libnuma: deb: libnuma-dev rpm: numactl-devel + armv6l-deb: + armv7l-deb: =20 libparted: deb: libparted-dev @@ -852,8 +854,10 @@ mappings: Debian8: =20 xen: - deb: libxen-dev Fedora: xen-devel + x86_64-deb: libxen-dev + armv7l-deb: libxen-dev + aarch64-deb: libxen-dev =20 xfsprogs: deb: xfslibs-dev --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 13:00:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1551369219772795.0255412889775; Thu, 28 Feb 2019 07:53:39 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E467430891CC; Thu, 28 Feb 2019 15:53:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 91F3A1001938; Thu, 28 Feb 2019 15:53:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 57331181A12B; Thu, 28 Feb 2019 15:53:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1SFrZeQ006360 for ; Thu, 28 Feb 2019 10:53:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id 176911001DF2; Thu, 28 Feb 2019 15:53:35 +0000 (UTC) Received: from dhcp-17-75.lcy.redhat.com (unknown [10.42.17.75]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86DE41001DEA; Thu, 28 Feb 2019 15:53:34 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 28 Feb 2019 15:53:18 +0000 Message-Id: <20190228155319.18373-4-berrange@redhat.com> In-Reply-To: <20190228155319.18373-1-berrange@redhat.com> References: <20190228155319.18373-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH v6 3/4] lcitool: support generating cross compiler dockerfiles X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 28 Feb 2019 15:53:38 +0000 (UTC) Debian's filesystem layout has a nice advantage over Fedora which is that it can install non-native packages in the main root filesystem. It is thus possible to prepare an x86_64 filesystem containing -dev packages for a foreign architecture, along with a GCC cross compiler. QEMU has used this technique to facilitate developer build testing of non-x86 architectures, since few people have access to physical hardware for most of these architectures. For the same reason it would be helpful to libvirt developers. This patch extends the 'dockerfile' command to 'lcitool' so that it accepts a '-x $ARCH' argument. $ lcitool dockerfile -x s390x libvirt-debian-9 libvirt This is only valid when using Debian OS versions. Signed-off-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 103 ++++++++++++++++++++++++++++++++++++++- guests/vars/mappings.yml | 7 +++ 2 files changed, 108 insertions(+), 2 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index d762721..9b723bb 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -90,6 +90,47 @@ class Util: arch =3D "x86_64" return arch =20 + @staticmethod + def convert_native_arch_to_abi(native_arch): + archmap =3D { + "aarch64": "aarch64-linux-gnu", + "armv6l": "arm-linux-gnueabi", + "armv7l": "arm-linux-gnueabihf", + "i686": "i686-linux-gnu", + "mips": "mips-linux-gnu", + "mipsel": "mipsel-linux-gnu", + "mips64el": "mips64el-linux-gnuabi64", + "ppc64el": "powerpc64le-linux-gnu", + "s390x": "s390x-linux-gnu", + "x86_64": "x86_64-linux-gnu", + } + if native_arch not in archmap: + raise Exception("Unsupported architecture {}".format(native_ar= ch)) + return archmap[native_arch] + + @staticmethod + def convert_native_arch_to_deb_arch(native_arch): + archmap =3D { + "aarch64": "arm64", + "armv6l": "armel", + "armv7l": "armhf", + "i686": "i386", + "mips": "mips", + "mipsel": "mipsel", + "mips64el": "mips64el", + "ppc64el": "ppc64el", + "s390x": "s390x", + "x86_64": "amd64", + } + if native_arch not in archmap: + raise Exception("Unsupported architecture {}".format(native_ar= ch)) + return archmap[native_arch] + + @staticmethod + def convert_native_arch_to_deb_cross_gcc(native_arch): + abi =3D Util.convert_native_arch_to_abi(native_arch) + return "gcc-" + abi + =20 class Config: =20 @@ -341,6 +382,12 @@ class Application: help=3D"git revision to build (remote/branch)", ) =20 + def add_cross_arch_arg(parser): + parser.add_argument( + "-x", "--cross-arch", + help=3D"cross compiler architecture", + ) + installparser =3D subparsers.add_parser( "install", help=3D"perform unattended host installation") installparser.set_defaults(func=3Dself._action_install) @@ -377,6 +424,7 @@ class Application: =20 add_hosts_arg(dockerfileparser) add_projects_arg(dockerfileparser) + add_cross_arch_arg(dockerfileparser) =20 def _execute_playbook(self, playbook, hosts, projects, git_revision): base =3D Util.get_base() @@ -541,6 +589,12 @@ class Application: =20 if package_format not in ["deb", "rpm"]: raise Error("Host {} doesn't support Dockerfiles".format(host)) + if args.cross_arch: + if os_name !=3D "Debian": + raise Error("Cannot cross compile on {}".format(os_name)) + if args.cross_arch =3D=3D self._native_arch: + raise Error("Cross arch {} should differ from native {}". + format(args.cross_arch, self._native_arch)) =20 projects =3D self._projects.expand_pattern(args.projects) for project in projects: @@ -553,19 +607,36 @@ class Application: ) =20 pkgs =3D {} + cross_pkgs =3D {} base_keys =3D ["default", package_format, os_name, os_full] - keys =3D base_keys + [self._native_arch + "-" + k for k in base_ke= ys] + cross_keys =3D [] + if args.cross_arch: + keys =3D base_keys + [args.cross_arch + "-" + k for k in base_= keys] + cross_keys =3D ["cross-policy-" + k for k in base_keys] + else: + keys =3D base_keys + [self._native_arch + "-" + k for k in bas= e_keys] + # We need to add the base project manually here: the standard # machinery hides it because it's an implementation detail for project in projects + ["base"]: for package in self._projects.get_packages(project): + cross_policy =3D "native" + for key in cross_keys: + if key in mappings[package]: + cross_policy =3D mappings[package][key] + if cross_policy not in ["native", "foreign", "skip"]: + raise Error("Unexpected cross arch policy {} for {}", + cross_policy, package) + for key in keys: if key in mappings[package]: pkgs[package] =3D mappings[package][key] =20 if package not in pkgs: continue - if pkgs[package] is None: + if cross_policy =3D=3D "foreign" and pkgs[package] is not = None: + cross_pkgs[package] =3D pkgs[package] + if pkgs[package] is None or cross_policy in ["skip", "fore= ign"]: del pkgs[package] =20 print("FROM {}".format(facts["docker_base"])) @@ -573,6 +644,15 @@ class Application: varmap =3D {} varmap["pkgs"] =3D " \\\n ".join(sorted(set(pkgs.values= ()))) if package_format =3D=3D "deb": + if args.cross_arch: + deb_arch =3D Util.convert_native_arch_to_deb_arch(args.cro= ss_arch) + gcc =3D Util.convert_native_arch_to_deb_cross_gcc(args.cro= ss_arch) + varmap["cross_arch"] =3D deb_arch + pkg_names =3D [p + ":" + deb_arch for p in cross_pkgs.valu= es()] + pkg_names.append(gcc) + varmap["cross_pkgs"] =3D " \\\n ".join(sorted(s= et(pkg_names))) + varmap["cross_abi"] =3D Util.convert_native_arch_to_abi(ar= gs.cross_arch) + sys.stdout.write(textwrap.dedent(""" RUN export DEBIAN_FRONTEND=3Dnoninteractive && \\ apt-get update && \\ @@ -582,6 +662,25 @@ class Application: apt-get autoremove -y && \\ apt-get autoclean -y """).format(**varmap)) + if args.cross_arch: + # Intentionally a separate RUN command from the above + # so that the common packages of all cross-built images + # share a docker image layer. + sys.stdout.write(textwrap.dedent(""" + RUN export DEBIAN_FRONTEND=3Dnoninteractive && \\ + dpkg --add-architecture {cross_arch} && \\ + apt-get update && \\ + apt-get dist-upgrade -y && \\ + apt-get install --no-install-recommends -y \\ + {cross_pkgs} && \\ + apt-get autoremove -y && \\ + apt-get autoclean -y + + ENV ABI "{cross_abi}" + ENV CONFIGURE_OPTS "--host=3D{cross_abi} \\ + --target=3D{cross_abi}" + ENV PKG_CONFIG_LIBDIR "/usr/lib/{cross_abi}/pkgconfig" + """).format(**varmap)) elif package_format =3D=3D "rpm": if os_name =3D=3D "Fedora" and os_version =3D=3D "Rawhide": sys.stdout.write(textwrap.dedent(""" diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index 4d06b83..d7f2b28 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -58,6 +58,13 @@ # x86_64-deb: libxen-dev # x86_64-Fedora: xen-devel # +# In parallel with this 'cross-arch-XXX:' entries can used to set the +# installation policy when setting up a cross-architecture build env, +# taking one of the values: +# +# - 'native': use the native architecture package (default if omitted) +# - 'foreign: use the foreign archtiecture package +# - 'skip': don't install the package =20 mappings: =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 13:00:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1551369219713478.8970844123264; Thu, 28 Feb 2019 07:53:39 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E4B73306D602; Thu, 28 Feb 2019 15:53:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4FA291001DEA; Thu, 28 Feb 2019 15:53:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 098B84ED2A; Thu, 28 Feb 2019 15:53:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1SFrZtT006368 for ; Thu, 28 Feb 2019 10:53:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id DEE891001DF6; Thu, 28 Feb 2019 15:53:35 +0000 (UTC) Received: from dhcp-17-75.lcy.redhat.com (unknown [10.42.17.75]) by smtp.corp.redhat.com (Postfix) with ESMTP id 59D761001DF2; Thu, 28 Feb 2019 15:53:35 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 28 Feb 2019 15:53:19 +0000 Message-Id: <20190228155319.18373-5-berrange@redhat.com> In-Reply-To: <20190228155319.18373-1-berrange@redhat.com> References: <20190228155319.18373-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH v6 4/4] mappings: mark packages using foreign arch for cross builds X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 28 Feb 2019 15:53:38 +0000 (UTC) All the -dev packages in Debian should use the foreign arch when setting up cross-builds, rather than than native arch package. Signed-off-by: Daniel P. Berrang=C3=A9 --- guests/vars/mappings.yml | 58 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index d7f2b28..0e69bb2 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -58,7 +58,7 @@ # x86_64-deb: libxen-dev # x86_64-Fedora: xen-devel # -# In parallel with this 'cross-arch-XXX:' entries can used to set the +# In parallel with this 'cross-policy-XXX:' entries can used to set the # installation policy when setting up a cross-architecture build env, # taking one of the values: # @@ -70,6 +70,7 @@ mappings: =20 apparmor: deb: libapparmor-dev + cross-policy-Debian: foreign =20 augeas: default: augeas @@ -90,6 +91,7 @@ mappings: deb: libavahi-client-dev pkg: avahi rpm: avahi-devel + cross-policy-Debian: foreign =20 bash: default: bash @@ -116,6 +118,7 @@ mappings: deb: libsasl2-dev pkg: cyrus-sasl rpm: cyrus-sasl-devel + cross-policy-Debian: foreign =20 dbus-daemon: default: dbus @@ -125,6 +128,7 @@ mappings: device-mapper: deb: libdevmapper-dev rpm: device-mapper-devel + cross-policy-Debian: foreign =20 dnsmasq: default: dnsmasq @@ -133,6 +137,7 @@ mappings: dtrace: deb: systemtap-sdt-dev rpm: systemtap-sdt-devel + cross-policy-Debian: skip =20 dwarves: default: dwarves @@ -154,6 +159,7 @@ mappings: deb: libfuse-dev pkg: fusefs-libs rpm: fuse-devel + cross-policy-Debian: foreign =20 gcc: default: gcc @@ -169,14 +175,17 @@ mappings: deb: libglib2.0-dev pkg: glib rpm: glib2-devel + cross-policy-Debian: foreign =20 glibc: deb: libc6-dev rpm: glibc-devel + cross-policy-Debian: foreign =20 glibc-static: deb: libc6-dev rpm: glibc-static + cross-policy-Debian: foreign =20 glusterfs: deb: libglusterfs-dev @@ -185,6 +194,7 @@ mappings: Debian9: glusterfs-common Ubuntu16: glusterfs-common Ubuntu18: glusterfs-common + cross-policy-Debian: foreign =20 gnome-common: default: gnome-common @@ -193,6 +203,7 @@ mappings: deb: libgnutls28-dev pkg: gnutls rpm: gnutls-devel + cross-policy-Debian: foreign =20 go: default: golang @@ -202,11 +213,13 @@ mappings: deb: libgirepository1.0-dev pkg: gobject-introspection rpm: gobject-introspection-devel + cross-policy-Debian: foreign =20 gtk3: deb: libgtk-3-dev pkg: gtk3 rpm: gtk3-devel + cross-policy-Debian: foreign =20 gtk-doc: default: gtk-doc @@ -221,6 +234,7 @@ mappings: deb: libgtk-vnc-2.0-dev pkg: gtk-vnc rpm: gtk-vnc2-devel + cross-policy-Debian: foreign =20 hal: FreeBSD: hal @@ -253,31 +267,38 @@ mappings: deb: libjson-glib-dev pkg: json-glib rpm: json-glib-devel + cross-policy-Debian: foreign =20 libacl: deb: libacl1-dev rpm: libacl-devel + cross-policy-Debian: foreign =20 libarchive: deb: libarchive-dev pkg: libarchive rpm: libarchive-devel + cross-policy-Debian: foreign =20 libattr: deb: libattr1-dev rpm: libattr-devel + cross-policy-Debian: foreign =20 libaudit: deb: libaudit-dev rpm: audit-libs-devel + cross-policy-Debian: foreign =20 libblkid: deb: libblkid-dev rpm: libblkid-devel + cross-policy-Debian: foreign =20 libcap-ng: deb: libcap-ng-dev rpm: libcap-ng-devel + cross-policy-Debian: foreign =20 libcmpiutil: rpm: libcmpiutil-devel @@ -286,82 +307,99 @@ mappings: deb: libconfig-dev pkg: libconfig rpm: libconfig-devel + cross-policy-Debian: foreign =20 libcurl: deb: libcurl4-gnutls-dev pkg: curl rpm: libcurl-devel + cross-policy-Debian: foreign =20 libdbus: deb: libdbus-1-dev pkg: dbus rpm: dbus-devel + cross-policy-Debian: foreign =20 libgovirt: rpm: libgovirt-devel Debian: libgovirt-dev Debian8: + cross-policy-Debianian: foreign =20 libiscsi: deb: libiscsi-dev rpm: libiscsi-devel + cross-policy-Debian: foreign =20 libnl3: deb: libnl-3-dev rpm: libnl3-devel + cross-policy-Debian: foreign =20 libnlroute3: deb: libnl-route-3-dev rpm: libnl3-devel + cross-policy-Debian: foreign =20 libnuma: deb: libnuma-dev rpm: numactl-devel armv6l-deb: armv7l-deb: + cross-policy-Debian: foreign =20 libparted: deb: libparted-dev rpm: parted-devel + cross-policy-Debian: foreign =20 libpcap: deb: libpcap0.8-dev pkg: libpcap rpm: libpcap-devel + cross-policy-Debian: foreign =20 libpciaccess: deb: libpciaccess-dev pkg: libpciaccess rpm: libpciaccess-devel + cross-policy-Debian: foreign =20 librbd: deb: librbd-dev Fedora: librbd-devel CentOS7: librbd1-devel + cross-policy-Debian: foreign =20 libselinux: deb: libselinux1-dev rpm: libselinux-devel + cross-policy-Debian: foreign =20 libsoup: deb: libsoup2.4-dev pkg: libsoup rpm: libsoup-devel + cross-policy-Debian: foreign =20 libssh: pkg: libssh rpm: libssh-devel Debian: libssh-gcrypt-dev Ubuntu: libssh-dev + cross-policy-Debian: foreign =20 libssh2: deb: libssh2-1-dev pkg: libssh2 rpm: libssh2-devel + cross-policy-Debian: foreign =20 libtirpc: deb: libtirpc-dev rpm: libtirpc-devel + cross-policy-Debian: foreign =20 libtool: default: libtool @@ -373,21 +411,25 @@ mappings: libudev: deb: libudev-dev rpm: libudev-devel + cross-policy-Debian: foreign =20 libuuid: deb: uuid-dev pkg: e2fsprogs-libuuid rpm: libuuid-devel + cross-policy-Debian: foreign =20 libxml2: deb: libxml2-dev pkg: libxml2 rpm: libxml2-devel + cross-policy-Debian: foreign =20 libxslt: deb: libxslt1-dev pkg: libxslt rpm: libxslt-devel + cross-policy-Debian: foreign =20 lvm2: default: lvm2 @@ -563,6 +605,7 @@ mappings: netcf: deb: libnetcf-dev rpm: netcf-devel + cross-policy-Debian: skip =20 numad: default: numad @@ -724,6 +767,7 @@ mappings: deb: python-dev pkg: python2 rpm: python2-devel + cross-policy-Debian: foreign =20 python2-lxml: default: python-lxml @@ -748,6 +792,7 @@ mappings: deb: python3-dev pkg: python3 Fedora: python3-devel + cross-policy-Debian: foreign =20 python3-gi: deb: python3-gi @@ -793,6 +838,7 @@ mappings: deb: libreadline-dev pkg: readline rpm: readline-devel + cross-policy-Debian: foreign =20 rpcgen: deb: libc-dev-bin @@ -806,6 +852,7 @@ mappings: sanlock: deb: libsanlock-dev rpm: sanlock-devel + cross-policy-Debian: foreign =20 screen: default: screen @@ -828,6 +875,7 @@ mappings: deb: libspice-client-gtk-3.0-dev pkg: spice-gtk rpm: spice-gtk3-devel + cross-policy-Debian: foreign =20 sudo: default: sudo @@ -859,16 +907,19 @@ mappings: deb: wireshark-dev Fedora: wireshark-devel Debian8: + cross-policy-Debian: skip =20 xen: Fedora: xen-devel x86_64-deb: libxen-dev armv7l-deb: libxen-dev aarch64-deb: libxen-dev + cross-policy-Debian: foreign =20 xfsprogs: deb: xfslibs-dev rpm: xfsprogs-devel + cross-policy-Debian: foreign =20 xmllint: default: libxml2 @@ -881,15 +932,18 @@ mappings: xz: deb: liblzma-dev rpm: xz-devel + cross-policy-Debian: foreign =20 xz-static: deb: liblzma-dev Fedora: xz-static + cross-policy-Debian: foreign =20 yajl: deb: libyajl-dev pkg: yajl rpm: yajl-devel + cross-policy-Debian: foreign =20 zfs: default: zfs-fuse @@ -899,7 +953,9 @@ mappings: zlib: deb: zlib1g-dev rpm: zlib-devel + cross-policy-Debian: foreign =20 zlib-static: deb: zlib1g-dev rpm: zlib-static + cross-policy-Debian: foreign --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list