From nobody Fri May 3 10:38:40 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 1550766852966952.6558245762282; Thu, 21 Feb 2019 08:34:12 -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 9F84230821B4; Thu, 21 Feb 2019 16:34:05 +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 1340E27C4B; Thu, 21 Feb 2019 16:34:05 +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 D495841F3E; Thu, 21 Feb 2019 16:34:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1LGY2T7015335 for ; Thu, 21 Feb 2019 11:34:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id CF60360BFB; Thu, 21 Feb 2019 16:34:02 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-65.ams2.redhat.com [10.36.112.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8846B60BF3; Thu, 21 Feb 2019 16:33:59 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 21 Feb 2019 16:33:50 +0000 Message-Id: <20190221163354.23482-2-berrange@redhat.com> In-Reply-To: <20190221163354.23482-1-berrange@redhat.com> References: <20190221163354.23482-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH v4 1/5] lcitool: use subparsers for commands 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.47]); Thu, 21 Feb 2019 16:34:11 +0000 (UTC) Currently only a single global parser is used for all commands. This means that every command accepts every argument which is undesirable as users don't know what to pass. It also prevents the parser from generating useful help information. Python's argparse module supports multi-command binaries in a very easy way by adding subparsers, each of which has their own distinct arguments. It can then generate suitable help text on a per command basis. This also means commands can use positional arguments for data items that are always passed. $ ./guests/lcitool -h usage: lcitool [-h] {install,update,build,hosts,projects,dockerfile} ... libvirt CI guest management tool positional arguments: {install,update,build,hosts,projects,dockerfile} commands install perform unattended host installation update prepare hosts and keep them updated build build projects on hosts hosts list all known hosts projects list all known projects dockerfile generate a host docker file optional arguments: -h, --help show this help message and exit $ ./guests/lcitool install -h usage: lcitool install [-h] hosts positional arguments: hosts list of hosts to act on (accepts globs) optional arguments: -h, --help show this help message and exit $ ./guests/lcitool dockerfile -h usage: lcitool dockerfile [-h] hosts projects positional arguments: hosts list of hosts to act on (accepts globs) projects list of projects to consider (accepts globs) optional arguments: -h, --help show this help message and exit Signed-off-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 135 ++++++++++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 57 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 726e3bb..35a6b68 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -307,43 +307,72 @@ class Application: conflict_handler=3D"resolve", formatter_class=3Dargparse.RawDescriptionHelpFormatter, description=3D"libvirt CI guest management tool", - epilog=3Dtextwrap.dedent(""" - common actions: - install perform unattended host installation - update prepare hosts and keep them updated - build build projects on hosts + ) =20 - informational actions: - hosts list all known hosts - projects list all known projects + subparser =3D self._parser.add_subparsers(help=3D"commands") + subparser.required =3D True + subparser.dest =3D "command" =20 - uncommon actions: - dockerfile generate Dockerfile (doesn't access the host) + def add_hosts_arg(parser): + parser.add_argument( + "hosts", + help=3D"list of hosts to act on (accepts globs)", + ) =20 - glob patterns are supported for HOSTS and PROJECTS - """), - ) - self._parser.add_argument( - "-a", - metavar=3D"ACTION", - required=3DTrue, - help=3D"action to perform (see below)", - ) - self._parser.add_argument( - "-h", - metavar=3D"HOSTS", - help=3D"list of hosts to act on", - ) - self._parser.add_argument( - "-p", - metavar=3D"PROJECTS", - help=3D"list of projects to consider", - ) - self._parser.add_argument( - "-g", - metavar=3D"GIT_REVISION", - help=3D"git revision to build (remote/branch)", - ) + def add_projects_arg(parser): + parser.add_argument( + "projects", + help=3D"list of projects to consider (accepts globs)", + ) + + def add_gitrev_arg(parser): + parser.add_argument( + "-g", "--git-revision", + help=3D"git revision to build (remote/branch)", + ) + + installparser =3D subparser.add_parser( + "install", help=3D"perform unattended host installation", + formatter_class=3Dargparse.RawDescriptionHelpFormatter) + installparser.set_defaults(func=3Dself._action_install) + + add_hosts_arg(installparser) + + updateparser =3D subparser.add_parser( + "update", help=3D"prepare hosts and keep them updated", + formatter_class=3Dargparse.RawDescriptionHelpFormatter) + updateparser.set_defaults(func=3Dself._action_update) + + add_hosts_arg(updateparser) + add_projects_arg(updateparser) + add_gitrev_arg(updateparser) + + buildparser =3D subparser.add_parser( + "build", help=3D"build projects on hosts", + formatter_class=3Dargparse.RawDescriptionHelpFormatter) + buildparser.set_defaults(func=3Dself._action_build) + + add_hosts_arg(buildparser) + add_projects_arg(buildparser) + add_gitrev_arg(buildparser) + + hostsparser =3D subparser.add_parser( + "hosts", help=3D"list all known hosts", + formatter_class=3Dargparse.RawDescriptionHelpFormatter) + hostsparser.set_defaults(func=3Dself._action_hosts) + + projectsparser =3D subparser.add_parser( + "projects", help=3D"list all known projects", + formatter_class=3Dargparse.RawDescriptionHelpFormatter) + projectsparser.set_defaults(func=3Dself._action_projects) + + dockerfileparser =3D subparser.add_parser( + "dockerfile", help=3D"generate a host docker file", + formatter_class=3Dargparse.RawDescriptionHelpFormatter) + dockerfileparser.set_defaults(func=3Dself._action_dockerfile) + + add_hosts_arg(dockerfileparser) + add_projects_arg(dockerfileparser) =20 def _execute_playbook(self, playbook, hosts, projects, git_revision): base =3D Util.get_base() @@ -404,20 +433,20 @@ class Application: raise Error( "Failed to run {} on '{}': {}".format(playbook, hosts, ex)) =20 - def _action_hosts(self, _hosts, _projects, _revision): + def _action_hosts(self, args): for host in self._inventory.expand_pattern("all"): print(host) =20 - def _action_projects(self, _hosts, _projects, _revision): + def _action_projects(self, args): for project in self._projects.expand_pattern("all"): print(project) =20 - def _action_install(self, hosts, _projects, _revision): + def _action_install(self, args): base =3D Util.get_base() =20 flavor =3D self._config.get_flavor() =20 - for host in self._inventory.expand_pattern(hosts): + for host in self._inventory.expand_pattern(args.hosts): facts =3D self._inventory.get_facts(host) =20 # Both memory size and disk size are stored as GiB in the @@ -484,16 +513,18 @@ class Application: except Exception as ex: raise Error("Failed to install '{}': {}".format(host, ex)) =20 - def _action_update(self, hosts, projects, git_revision): - self._execute_playbook("update", hosts, projects, git_revision) + def _action_update(self, args): + self._execute_playbook("update", args.hosts, args.projects, + args.git_revision) =20 - def _action_build(self, hosts, projects, git_revision): - self._execute_playbook("build", hosts, projects, git_revision) + def _action_build(self, args): + self._execute_playbook("build", args.hosts, args.projects, + args.git_revision) =20 - def _action_dockerfile(self, hosts, projects, _revision): + def _action_dockerfile(self, args): mappings =3D self._projects.get_mappings() =20 - hosts =3D self._inventory.expand_pattern(hosts) + hosts =3D self._inventory.expand_pattern(args.hosts) if len(hosts) > 1: raise Error("Can't generate Dockerfile for multiple hosts") host =3D hosts[0] @@ -507,7 +538,7 @@ class Application: if package_format not in ["deb", "rpm"]: raise Error("Host {} doesn't support Dockerfiles".format(host)) =20 - projects =3D self._projects.expand_pattern(projects) + projects =3D self._projects.expand_pattern(args.projects) for project in projects: if project not in facts["projects"]: raise Error( @@ -573,18 +604,8 @@ class Application: """).format(**varmap)) =20 def run(self): - cmdline =3D self._parser.parse_args() - action =3D cmdline.a - hosts =3D cmdline.h - projects =3D cmdline.p - git_revision =3D cmdline.g - - method =3D "_action_{}".format(action.replace("-", "_")) - - if hasattr(self, method): - getattr(self, method).__call__(hosts, projects, git_revision) - else: - raise Error("Invalid action '{}'".format(action)) + args =3D self._parser.parse_args() + args.func(args) =20 =20 if __name__ =3D=3D "__main__": --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 10:38:40 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 1550846012460715.3208925584302; Fri, 22 Feb 2019 06:33:32 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD0BFC056792; Fri, 22 Feb 2019 14:33:30 +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 8A5B95D721; Fri, 22 Feb 2019 14:33:30 +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 2C55F247EF; Fri, 22 Feb 2019 14:33:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1LGY7vb015345 for ; Thu, 21 Feb 2019 11:34:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7B7C660BFC; Thu, 21 Feb 2019 16:34:07 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-65.ams2.redhat.com [10.36.112.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78E9D60BF4; Thu, 21 Feb 2019 16:34:03 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 21 Feb 2019 16:33:51 +0000 Message-Id: <20190221163354.23482-3-berrange@redhat.com> In-Reply-To: <20190221163354.23482-1-berrange@redhat.com> References: <20190221163354.23482-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH v4 2/5] lcitool: avoid repetition when expanding package mappings 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.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 22 Feb 2019 14:33:31 +0000 (UTC) Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Andrea Bolognani --- guests/lcitool | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 35a6b68..5c2b785 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -550,18 +550,14 @@ class Application: =20 temp =3D {} =20 + keys =3D ["default", package_format, os_name, os_full] # 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): - if "default" in mappings[package]: - temp[package] =3D mappings[package]["default"] - if package_format in mappings[package]: - temp[package] =3D mappings[package][package_format] - if os_name in mappings[package]: - temp[package] =3D mappings[package][os_name] - if os_full in mappings[package]: - temp[package] =3D mappings[package][os_full] + for key in keys: + if key in mappings[package]: + temp[package] =3D mappings[package][key] =20 pkgs =3D [] for item in temp: --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 10:38:40 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 1550846016477282.4950020831717; Fri, 22 Feb 2019 06:33:36 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8EC1581F1B; Fri, 22 Feb 2019 14:33:34 +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 67AA95D9E2; Fri, 22 Feb 2019 14:33:34 +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 2B7B8181A00C; Fri, 22 Feb 2019 14:33:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1LGY8Cn015350 for ; Thu, 21 Feb 2019 11:34:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id DCD0160BF2; Thu, 21 Feb 2019 16:34:08 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-65.ams2.redhat.com [10.36.112.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id E8D6560BF3; Thu, 21 Feb 2019 16:34:07 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 21 Feb 2019 16:33:52 +0000 Message-Id: <20190221163354.23482-4-berrange@redhat.com> In-Reply-To: <20190221163354.23482-1-berrange@redhat.com> References: <20190221163354.23482-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH v4 3/5] lcitool: avoid intermediate list of packages 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.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 22 Feb 2019 14:33:35 +0000 (UTC) We can purge any packages which expand to None straight away, and simply convert to a set to get rid of duplicates. Signed-off-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 5c2b785..2af6878 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -548,8 +548,7 @@ class Application: ) ) =20 - temp =3D {} - + pkgs =3D {} keys =3D ["default", package_format, os_name, os_full] # We need to add the base project manually here: the standard # machinery hides it because it's an implementation detail @@ -557,21 +556,15 @@ class Application: for package in self._projects.get_packages(project): for key in keys: if key in mappings[package]: - temp[package] =3D mappings[package][key] + pkgs[package] =3D mappings[package][key] =20 - pkgs =3D [] - for item in temp: - pkgname =3D temp[item] - if pkgname is None: - continue - if pkgname in pkgs: - continue - pkgs.append(pkgname) + if pkgs[package] is None: + del pkgs[package] =20 print("FROM {}".format(facts["docker_base"])) =20 varmap =3D {} - varmap["pkgs"] =3D " \\\n ".join(sorted(pkgs)) + varmap["pkgs"] =3D " \\\n ".join(sorted(set(pkgs.values= ()))) if package_format =3D=3D "deb": sys.stdout.write(textwrap.dedent(""" RUN export DEBIAN_FRONTEND=3Dnoninteractive && \\ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 10:38:40 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 155076686005166.83162712951605; Thu, 21 Feb 2019 08:34:20 -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 46FF9307D960; Thu, 21 Feb 2019 16:34:18 +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 1D02B282C1; Thu, 21 Feb 2019 16:34:18 +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 BB873181A00A; Thu, 21 Feb 2019 16:34:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1LGYAZs015361 for ; Thu, 21 Feb 2019 11:34:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8D59860BFC; Thu, 21 Feb 2019 16:34:10 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-65.ams2.redhat.com [10.36.112.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5FAAA60BF3; Thu, 21 Feb 2019 16:34:09 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 21 Feb 2019 16:33:53 +0000 Message-Id: <20190221163354.23482-5-berrange@redhat.com> In-Reply-To: <20190221163354.23482-1-berrange@redhat.com> References: <20190221163354.23482-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH v4 4/5] 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 21 Feb 2019 16:34:18 +0000 (UTC) For example to prevent Xen being installed on any s390x xen: default-s390x: deb: libxen-dev Fedora: xen-devel Or the inverse to only install Xen on x86_64 on Debian, but allow it on all archs on Fedora xen: deb-x86_64: libxen-dev Fedora: xen-devel Note that the architecture specific matches are considered after all the non-architcture matches. The mappings are updated to blacklist libnuma on arm6/7 for Debian since it is not built for those archs. xen is whitelisted to only be used on x86_64, arm7 and aarch64 for Debian, since the majority of other architectures don't support it. 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 | 17 ++++++++- guests/playbooks/update/tasks/packages.yml | 32 +++++++++++++++++ guests/vars/mappings.yml | 42 +++++++++++++++++++--- 3 files changed, 86 insertions(+), 5 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 2af6878..ae7e4ee 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -21,6 +21,7 @@ import crypt import fnmatch import json import os +import platform import random import string import subprocess @@ -303,6 +304,8 @@ class Application: self._inventory =3D Inventory() self._projects =3D Projects() =20 + self._native_arch =3D self._libvirt_host_arch() + self._parser =3D argparse.ArgumentParser( conflict_handler=3D"resolve", formatter_class=3Dargparse.RawDescriptionHelpFormatter, @@ -433,6 +436,15 @@ class Application: raise Error( "Failed to run {} on '{}': {}".format(playbook, hosts, ex)) =20 + def _libvirt_host_arch(self): + # 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 + def _action_hosts(self, args): for host in self._inventory.expand_pattern("all"): print(host) @@ -549,7 +561,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 + [k + "-" + self._native_arch 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"]: @@ -558,6 +571,8 @@ class Application: if key in mappings[package]: pkgs[package] =3D mappings[package][key] =20 + if package not in pkgs: + continue if pkgs[package] is None: del pkgs[package] =20 diff --git a/guests/playbooks/update/tasks/packages.yml b/guests/playbooks/= update/tasks/packages.yml index 7fdfc45..b3b8a27 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]["default" + "-" + "x86_6= 4"] }) }}' + with_items: + '{{ packages }}' + when: + - mappings[item]["default" + "-" + "x86_64"] is defined + +- name: '{{ project }}: Look up mappings (package format with arch)' + set_fact: + temp: '{{ temp|combine({ item: mappings[item][package_format + "-" + "= x86_64"] }) }}' + with_items: + '{{ packages }}' + when: + - mappings[item][package_format + "-" + "x86_64"] is defined + +- name: '{{ project }}: Look up mappings (OS name with arch)' + set_fact: + temp: '{{ temp|combine({ item: mappings[item][os_name + "-" + "x86_64"= ] }) }}' + with_items: + '{{ packages }}' + when: + - mappings[item][os_name + "-" + "x86_64"] is defined + +- name: '{{ project }}: Look up mappings (OS version with arch)' + set_fact: + temp: '{{ temp|combine({ item: mappings[item][os_name + os_version + "= -" + "x86_64"] }) }}' + with_items: + '{{ packages }}' + when: + - mappings[item][os_name + os_version + "-" + "x86_64"] is defined + - set_fact: flattened: [] =20 diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index f31b460..4ca8fae 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 +# - default with arch +# - package format with arch +# - OS name with arch +# - OS version with arch +# +# 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 'with arch' levels take a suffix "-$ARCH" where $ARCH +# is a libvirt arch name. # # So something like # @@ -27,6 +43,20 @@ # # 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: +# default-s390x: +# deb: libxen-dev +# Fedora: xen-devel +# +# Or the inverse to only install Xen on x86_64 +# +# xen: +# deb-x86_64: libxen-dev +# Fedora-x86_64: xen-devel +# =20 mappings: =20 @@ -278,6 +308,8 @@ mappings: =20 libnuma: deb: libnuma-dev + deb-armv6l: + deb-armv7l: rpm: numactl-devel =20 libparted: @@ -817,7 +849,9 @@ mappings: Debian8: =20 xen: - deb: libxen-dev + deb-x86_64: libxen-dev + deb-armv7l: libxen-dev + deb-aarch64: libxen-dev Fedora: xen-devel =20 xfsprogs: --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 10:38:40 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 1550846020182976.851863921303; Fri, 22 Feb 2019 06:33:40 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6B4B630A81A2; Fri, 22 Feb 2019 14:33:38 +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 39E6C60BF3; Fri, 22 Feb 2019 14:33:38 +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 E979B247E2; Fri, 22 Feb 2019 14:33:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1LGYCgp015373 for ; Thu, 21 Feb 2019 11:34:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6FC3860BFB; Thu, 21 Feb 2019 16:34:12 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-65.ams2.redhat.com [10.36.112.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B4B160BF2; Thu, 21 Feb 2019 16:34:10 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 21 Feb 2019 16:33:54 +0000 Message-Id: <20190221163354.23482-6-berrange@redhat.com> In-Reply-To: <20190221163354.23482-1-berrange@redhat.com> References: <20190221163354.23482-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH v4 5/5] 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.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 22 Feb 2019 14:33:39 +0000 (UTC) Debian's filesystem layout has a nice advantage over Fedora which is that it can install non-native RPMs 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 a 'deb' based distro. Signed-off-by: Daniel P. Berrang=C3=A9 --- guests/host_vars/libvirt-debian-9/main.yml | 44 +++++++++++++ guests/host_vars/libvirt-debian-sid/main.yml | 45 ++++++++++++++ guests/lcitool | 65 +++++++++++++++++++- guests/vars/mappings.yml | 59 ++++++++++++++++++ 4 files changed, 211 insertions(+), 2 deletions(-) diff --git a/guests/host_vars/libvirt-debian-9/main.yml b/guests/host_vars/= libvirt-debian-9/main.yml index ec7e6b4..3bf4ae1 100644 --- a/guests/host_vars/libvirt-debian-9/main.yml +++ b/guests/host_vars/libvirt-debian-9/main.yml @@ -21,3 +21,47 @@ os_name: 'Debian' os_version: '9' =20 ansible_python_interpreter: /usr/bin/python3 + +arches: + aarch64: + package_arch: arm64 + abi: aarch64-linux-gnu + cross_gcc: gcc-aarch64-linux-gnu + armv6l: + package_arch: armel + abi: arm-linux-gnueabi + cross_gcc: gcc-arm-linux-gnueabi + armv7l: + package_arch: armhf + abi: arm-linux-gnueabihf + cross_gcc: gcc-arm-linux-gnueabihf + i686: + package_arch: i386 + abi: i386-linux-gnu + mips: + package_arch: mips + abi: mips-linux-gnu + cross_gcc: gcc-mips-linux-gnu + mipsel: + package_arch: mipsel + abi: mipsel-linux-gnu + cross_gcc: gcc-mipsel-linux-gnu + mips64: + package_arch: mips64 + abi: mips64-linux-gnu + cross_gcc: gcc-mips64-linux-gnu + mips64el: + package_arch: mips64el + abi: mips64el-linux-gnu + cross_gcc: gcc-mips64el-linux-gnu + ppc64el: + package_arch: ppc64el + abi: ppc64el-linux-gnu + cross_gcc: gcc-ppc64el-linux-gnu + s390x: + package_arch: s390x + abi: s390x-linux-gnu + cross_gcc: gcc-s390x-linux-gnu + x86_64: + package_arch: amd64 + abi: x86_64-linux-gnu diff --git a/guests/host_vars/libvirt-debian-sid/main.yml b/guests/host_var= s/libvirt-debian-sid/main.yml index 1c7a29b..b14a564 100644 --- a/guests/host_vars/libvirt-debian-sid/main.yml +++ b/guests/host_vars/libvirt-debian-sid/main.yml @@ -21,3 +21,48 @@ os_name: 'Debian' os_version: 'Sid' =20 ansible_python_interpreter: /usr/bin/python3 + +arches: + aarch64: + package_arch: arm64 + abi: aarch64-linux-gnu + cross_gcc: gcc-aarch64-linux-gnu + armv6l: + package_arch: armel + abi: arm-linux-gnueabi + cross_gcc: gcc-arm-linux-gnueabi + armv7l: + package_arch: armhf + abi: arm-linux-gnueabihf + cross_gcc: gcc-arm-linux-gnueabihf + i686: + package_arch: i386 + abi: i686-linux-gnu + cross_gcc: gcc-i686-linux-gnu + mips: + package_arch: mips + abi: mips-linux-gnu + cross_gcc: gcc-mips-linux-gnu + mipsel: + package_arch: mipsel + abi: mipsel-linux-gnu + cross_gcc: gcc-mipsel-linux-gnu + mips64: + package_arch: mips64 + abi: mips64-linux-gnu + cross_gcc: gcc-mips64-linux-gnu + mips64el: + package_arch: mips64el + abi: mips64el-linux-gnu + cross_gcc: gcc-mips64el-linux-gnu + ppc64el: + package_arch: ppc64el + abi: ppc64el-linux-gnu + cross_gcc: gcc-ppc64el-linux-gnu + s390x: + package_arch: s390x + abi: s390x-linux-gnu + cross_gcc: gcc-s390x-linux-gnu + x86_64: + package_arch: amd64 + abi: x86_64-linux-gnu diff --git a/guests/lcitool b/guests/lcitool index ae7e4ee..b431b93 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -376,6 +376,10 @@ class Application: =20 add_hosts_arg(dockerfileparser) add_projects_arg(dockerfileparser) + dockerfileparser.add_argument( + "-x", "--cross-arch", + help=3D"cross compiler architecture", + ) =20 def _execute_playbook(self, playbook, hosts, projects, git_revision): base =3D Util.get_base() @@ -546,10 +550,23 @@ class Application: os_name =3D facts["os_name"] os_version =3D facts["os_version"] os_full =3D os_name + os_version + cross_facts =3D None =20 if package_format not in ["deb", "rpm"]: raise Error("Host {} doesn't support Dockerfiles".format(host)) =20 + if args.cross_arch is not None: + if "arches" not in facts: + raise Error("Non x86_64 arches not supported for this host= ") + if args.cross_arch not in facts["arches"]: + raise Error("Arch {} not supported for this host".format( + args.cross_arch)) + if "cross_gcc" not in facts["arches"][args.cross_arch]: + raise Error("Arch {} cross compiler not supported for this= host".format + (args.cross_arch)) + + cross_build_facts =3D facts["arches"][args.cross_arch] + projects =3D self._projects.expand_pattern(args.projects) for project in projects: if project not in facts["projects"]: @@ -561,25 +578,50 @@ class Application: ) =20 pkgs =3D {} + cross_pkgs =3D {} base_keys =3D ["default", package_format, os_name, os_full] - keys =3D base_keys + [k + "-" + self._native_arch for k in base_ke= ys] + cross_keys =3D [] + if args.cross_arch: + keys =3D base_keys + [k + "-" + args.cross_arch for k in base_= keys] + cross_keys =3D [k + "-cross-arch" for k in base_keys] + else: + keys =3D base_keys + [k + "-" + self._native_arch 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): + policy =3D "native" + for key in cross_keys: + if key in mappings[package]: + policy =3D mappings[package][key] + if policy not in ["native", "foreign", "skip"]: + raise Error("Unexpected policy {} for {}", + 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 policy =3D=3D "foreign" and pkgs[package] is not None: + cross_pkgs[package] =3D pkgs[package] + if pkgs[package] is None or policy in ["skip", "foreign"]: del pkgs[package] =20 print("FROM {}".format(facts["docker_base"])) =20 varmap =3D {} varmap["pkgs"] =3D " \\\n ".join(sorted(set(pkgs.values= ()))) + if args.cross_arch: + if package_format !=3D "deb": + raise Error("Cannot install foreign {} packages".format(pa= ckage_format)) + varmap["cross_arch"] =3D cross_build_facts["package_arch"] + pkg_names =3D [p + ":" + cross_build_facts["package_arch"] for= p in cross_pkgs.values()] + pkg_names.append(cross_build_facts["cross_gcc"]) + varmap["cross_pkgs"] =3D " \\\n ".join(sorted(set(p= kg_names))) + varmap["cross_target"] =3D cross_build_facts["abi"] if package_format =3D=3D "deb": sys.stdout.write(textwrap.dedent(""" RUN export DEBIAN_FRONTEND=3Dnoninteractive && \\ @@ -590,6 +632,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 TARGET "{cross_target}" + ENV CONFIGURE_OPTS "--host=3D{cross_target} \\ + --target=3D{cross_target}" + ENV PKG_CONFIG_LIBDIR "/usr/lib/{cross_target}/pkgconf= ig" + """).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 4ca8fae..a70a6a5 100644 --- a/guests/vars/mappings.yml +++ b/guests/vars/mappings.yml @@ -57,11 +57,15 @@ # deb-x86_64: libxen-dev # Fedora-x86_64: xen-devel # +# In parallel with this 'cross-arch: native|foreign|skip' entries can +# used to indicate the policy when setting up a cross-architecture +# build environment. If omitted 'native' is assumed =20 mappings: =20 apparmor: deb: libapparmor-dev + deb-cross-arch: foreign =20 augeas: default: augeas @@ -80,6 +84,7 @@ mappings: =20 avahi: deb: libavahi-client-dev + deb-cross-arch: foreign pkg: avahi rpm: avahi-devel =20 @@ -106,6 +111,7 @@ mappings: =20 cyrus-sasl: deb: libsasl2-dev + deb-cross-arch: foreign pkg: cyrus-sasl rpm: cyrus-sasl-devel =20 @@ -116,6 +122,7 @@ mappings: =20 device-mapper: deb: libdevmapper-dev + deb-cross-arch: foreign rpm: device-mapper-devel =20 dnsmasq: @@ -124,6 +131,7 @@ mappings: =20 dtrace: deb: systemtap-sdt-dev + deb-cross-arch: skip rpm: systemtap-sdt-devel =20 dwarves: @@ -144,6 +152,7 @@ mappings: =20 fuse: deb: libfuse-dev + deb-cross-arch: foreign pkg: fusefs-libs rpm: fuse-devel =20 @@ -159,19 +168,23 @@ mappings: =20 glib2: deb: libglib2.0-dev + deb-cross-arch: foreign pkg: glib rpm: glib2-devel =20 glibc: deb: libc6-dev + deb-cross-arch: foreign rpm: glibc-devel =20 glibc-static: deb: libc6-dev + deb-cross-arch: foreign rpm: glibc-static =20 glusterfs: deb: libglusterfs-dev + deb-cross-arch: foreign rpm: glusterfs-api-devel Debian8: glusterfs-common Debian9: glusterfs-common @@ -183,6 +196,7 @@ mappings: =20 gnutls: deb: libgnutls28-dev + deb-cross-arch: foreign pkg: gnutls rpm: gnutls-devel =20 @@ -192,11 +206,13 @@ mappings: =20 gobject-introspection: deb: libgirepository1.0-dev + deb-cross-arch: foreign pkg: gobject-introspection rpm: gobject-introspection-devel =20 gtk3: deb: libgtk-3-dev + deb-cross-arch: foreign pkg: gtk3 rpm: gtk3-devel =20 @@ -211,6 +227,7 @@ mappings: =20 gtk-vnc2: deb: libgtk-vnc-2.0-dev + deb-cross-arch: foreign pkg: gtk-vnc rpm: gtk-vnc2-devel =20 @@ -243,32 +260,39 @@ mappings: =20 json-glib: deb: libjson-glib-dev + deb-cross-arch: foreign pkg: json-glib rpm: json-glib-devel =20 libacl: deb: libacl1-dev + deb-cross-arch: foreign rpm: libacl-devel =20 libarchive: deb: libarchive-dev + deb-cross-arch: foreign pkg: libarchive rpm: libarchive-devel =20 libattr: deb: libattr1-dev + deb-cross-arch: foreign rpm: libattr-devel =20 libaudit: deb: libaudit-dev + deb-cross-arch: foreign rpm: audit-libs-devel =20 libblkid: deb: libblkid-dev + deb-cross-arch: foreign rpm: libblkid-devel =20 libcap-ng: deb: libcap-ng-dev + deb-cross-arch: foreign rpm: libcap-ng-devel =20 libcmpiutil: @@ -276,67 +300,81 @@ mappings: =20 libconfig: deb: libconfig-dev + deb-cross-arch: foreign pkg: libconfig rpm: libconfig-devel =20 libcurl: deb: libcurl4-gnutls-dev + deb-cross-arch: foreign pkg: curl rpm: libcurl-devel =20 libdbus: deb: libdbus-1-dev + deb-cross-arch: foreign pkg: dbus rpm: dbus-devel =20 libgovirt: rpm: libgovirt-devel Debian: libgovirt-dev + Debian-cross-arch: foreign Debian8: =20 libiscsi: deb: libiscsi-dev + deb-cross-arch: foreign rpm: libiscsi-devel =20 libnl3: deb: libnl-3-dev + deb-cross-arch: foreign rpm: libnl3-devel =20 libnlroute3: deb: libnl-route-3-dev + deb-cross-arch: foreign rpm: libnl3-devel =20 libnuma: deb: libnuma-dev + deb-cross-arch: foreign deb-armv6l: deb-armv7l: rpm: numactl-devel =20 libparted: deb: libparted-dev + deb-cross-arch: foreign rpm: parted-devel =20 libpcap: deb: libpcap0.8-dev + deb-cross-arch: foreign pkg: libpcap rpm: libpcap-devel =20 libpciaccess: deb: libpciaccess-dev + deb-cross-arch: foreign pkg: libpciaccess rpm: libpciaccess-devel =20 librbd: deb: librbd-dev + deb-cross-arch: foreign Fedora: librbd-devel CentOS7: librbd1-devel =20 libselinux: deb: libselinux1-dev + deb-cross-arch: foreign rpm: libselinux-devel =20 libsoup: deb: libsoup2.4-dev + deb-cross-arch: foreign pkg: libsoup rpm: libsoup-devel =20 @@ -344,15 +382,18 @@ mappings: pkg: libssh rpm: libssh-devel Debian: libssh-gcrypt-dev + Debian-cross-arch: foreign Ubuntu: libssh-dev =20 libssh2: deb: libssh2-1-dev + deb-cross-arch: foreign pkg: libssh2 rpm: libssh2-devel =20 libtirpc: deb: libtirpc-dev + deb-cross-arch: foreign rpm: libtirpc-devel =20 libtool: @@ -364,20 +405,24 @@ mappings: =20 libudev: deb: libudev-dev + deb-cross-arch: foreign rpm: libudev-devel =20 libuuid: deb: uuid-dev + deb-cross-arch: foreign pkg: e2fsprogs-libuuid rpm: libuuid-devel =20 libxml2: deb: libxml2-dev + deb-cross-arch: foreign pkg: libxml2 rpm: libxml2-devel =20 libxslt: deb: libxslt1-dev + deb-cross-arch: foreign pkg: libxslt rpm: libxslt-devel =20 @@ -550,6 +595,7 @@ mappings: =20 netcf: deb: libnetcf-dev + deb-cross-arch: skip rpm: netcf-devel =20 numad: @@ -710,6 +756,7 @@ mappings: =20 python2-devel: deb: python-dev + deb-cross-arch: foreign pkg: python2 rpm: python2-devel =20 @@ -734,6 +781,7 @@ mappings: =20 python3-devel: deb: python3-dev + deb-cross-arch: foreign pkg: python3 Fedora: python3-devel =20 @@ -779,6 +827,7 @@ mappings: =20 readline: deb: libreadline-dev + deb-cross-arch: foreign pkg: readline rpm: readline-devel =20 @@ -793,6 +842,7 @@ mappings: =20 sanlock: deb: libsanlock-dev + deb-cross-arch: foreign rpm: sanlock-devel =20 screen: @@ -814,6 +864,7 @@ mappings: =20 spice-gtk3: deb: libspice-client-gtk-3.0-dev + deb-cross-arch: foreign pkg: spice-gtk rpm: spice-gtk3-devel =20 @@ -845,10 +896,12 @@ mappings: =20 wireshark: deb: wireshark-dev + deb-cross-arch: skip Fedora: wireshark-devel Debian8: =20 xen: + deb-cross-arch: foreign deb-x86_64: libxen-dev deb-armv7l: libxen-dev deb-aarch64: libxen-dev @@ -856,6 +909,7 @@ mappings: =20 xfsprogs: deb: xfslibs-dev + deb-cross-arch: foreign rpm: xfsprogs-devel =20 xmllint: @@ -868,14 +922,17 @@ mappings: =20 xz: deb: liblzma-dev + deb-cross-arch: foreign rpm: xz-devel =20 xz-static: deb: liblzma-dev + deb-cross-arch: foreign Fedora: xz-static =20 yajl: deb: libyajl-dev + deb-cross-arch: foreign pkg: yajl rpm: yajl-devel =20 @@ -886,8 +943,10 @@ mappings: =20 zlib: deb: zlib1g-dev + deb-cross-arch: foreign rpm: zlib-devel =20 zlib-static: deb: zlib1g-dev + deb-cross-arch: foreign rpm: zlib-static --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list