From nobody Tue May 7 07:00:48 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 1551178861482132.16995692506896; Tue, 26 Feb 2019 03:01:01 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2501E3082E50; Tue, 26 Feb 2019 11:00:59 +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 681A95D6AA; Tue, 26 Feb 2019 11:00:58 +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 22C6B181A00B; Tue, 26 Feb 2019 11:00:57 +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 x1QB0s3A029712 for ; Tue, 26 Feb 2019 06:00:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3536D60C05; Tue, 26 Feb 2019 11:00:54 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-70.ams2.redhat.com [10.36.112.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id D687F60BFB; Tue, 26 Feb 2019 11:00:52 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Tue, 26 Feb 2019 11:00:42 +0000 Message-Id: <20190226110046.13145-2-berrange@redhat.com> In-Reply-To: <20190226110046.13145-1-berrange@redhat.com> References: <20190226110046.13145-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 v5 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.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 26 Feb 2019 11:00:59 +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. Signed-off-by: Daniel P. Berrang=C3=A9 --- guests/README.markdown | 18 +++--- guests/lcitool | 129 +++++++++++++++++++++++------------------ 2 files changed, 80 insertions(+), 67 deletions(-) diff --git a/guests/README.markdown b/guests/README.markdown index ac9e4f6..6363bc9 100644 --- a/guests/README.markdown +++ b/guests/README.markdown @@ -10,38 +10,38 @@ Usage and examples =20 There are two steps to bringing up a guest: =20 -* `lcitool -a install -h $guest` will perform an unattended installation +* `lcitool install $guest` will perform an unattended installation of `$guest`. Not all guests can be installed this way: see the "FreeBSD" section below; =20 -* `lcitool -a update -h $guest -p $project` will go through all the +* `lcitool update $guest $project` will go through all the post-installation configuration steps required to make the newly-created guest usable and ready to be used for building `$project`; =20 Once those steps have been performed, maintainance will involve running: =20 - lcitool -a update -h $guest -p $project + lcitool update $guest $project =20 periodically to ensure the guest configuration is sane and all installed packages are updated. =20 To get a list of known guests and projects, run =20 - lcitool -a hosts + lcitool hosts =20 and =20 - lcitool -a projects + lcitool projects =20 respectively. You can run operations involving multiple guests and projects at once by providing a list on the command line: for example, running =20 - lcitool -a update -h '*fedora*' -p '*osinfo*' + lcitool update '*fedora*' '*osinfo*' =20 will update all Fedora guests and get them ready to build libosinfo and related projects, while running =20 - lcitool -a update -h all -p 'libvirt,libvirt+mingw*' + lcitool update all 'libvirt,libvirt+mingw*' =20 will update all hosts and prepare them to build libvirt both as a native library and, where supported, as a Windows library using MinGW. @@ -49,7 +49,7 @@ library and, where supported, as a Windows library using = MinGW. Once hosts have been prepared following the steps above, you can use `lcitool` to perform builds as well: for example, running =20 - lcitool -a build -h '*debian*' -p libvirt-python + lcitool build '*debian*' libvirt-python =20 will fetch libvirt-python's `master` branch from the upstream repository and build it on all Debian hosts. @@ -58,7 +58,7 @@ You can add more git repositories by tweaking the `git_ur= ls` dictionary defined in `playbooks/build/jobs/defaults.yml` and then build arbitrary branches out of those with =20 - lcitool -a build -h all -p libvirt -g github/cool-feature + lcitool build -g github/cool-feature all libvirt =20 =20 Host setup diff --git a/guests/lcitool b/guests/lcitool index c2dec81..ec467b7 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -304,45 +304,66 @@ class Application: =20 self._parser =3D argparse.ArgumentParser( 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 + subparsers =3D self._parser.add_subparsers(metavar=3D"ACTION") + subparsers.required =3D True =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 subparsers.add_parser( + "install", help=3D"perform unattended host installation") + installparser.set_defaults(func=3Dself._action_install) + + add_hosts_arg(installparser) + + updateparser =3D subparsers.add_parser( + "update", help=3D"prepare hosts and keep them updated") + updateparser.set_defaults(func=3Dself._action_update) + + add_hosts_arg(updateparser) + add_projects_arg(updateparser) + add_gitrev_arg(updateparser) + + buildparser =3D subparsers.add_parser( + "build", help=3D"build projects on hosts") + buildparser.set_defaults(func=3Dself._action_build) + + add_hosts_arg(buildparser) + add_projects_arg(buildparser) + add_gitrev_arg(buildparser) + + hostsparser =3D subparsers.add_parser( + "hosts", help=3D"list all known hosts") + hostsparser.set_defaults(func=3Dself._action_hosts) + + projectsparser =3D subparsers.add_parser( + "projects", help=3D"list all known projects") + projectsparser.set_defaults(func=3Dself._action_projects) + + dockerfileparser =3D subparsers.add_parser( + "dockerfile", help=3D"generate Dockerfile (doesn't access the = host)") + 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() @@ -403,20 +424,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 @@ -483,16 +504,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] @@ -506,7 +529,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( @@ -572,18 +595,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 Tue May 7 07:00:48 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 1551178862462800.5514199878479; Tue, 26 Feb 2019 03:01:02 -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 3B4293003AF9; Tue, 26 Feb 2019 11:01:00 +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 0A52960BFE; Tue, 26 Feb 2019 11:01:00 +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 AFA963FB11; Tue, 26 Feb 2019 11:00:59 +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 x1QB0uLF029719 for ; Tue, 26 Feb 2019 06:00:56 -0500 Received: by smtp.corp.redhat.com (Postfix) id 37BF860BFC; Tue, 26 Feb 2019 11:00:56 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-70.ams2.redhat.com [10.36.112.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id A59A160BFB; Tue, 26 Feb 2019 11:00:54 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Tue, 26 Feb 2019 11:00:43 +0000 Message-Id: <20190226110046.13145-3-berrange@redhat.com> In-Reply-To: <20190226110046.13145-1-berrange@redhat.com> References: <20190226110046.13145-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 Cc: Andrea Bolognani Subject: [libvirt] [jenkins-ci PATCH v5 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 26 Feb 2019 11:01:00 +0000 (UTC) Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index ec467b7..46af92b 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -541,18 +541,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 Tue May 7 07:00:48 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 1551178881343196.69881340023483; Tue, 26 Feb 2019 03:01:21 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 079FE3086268; Tue, 26 Feb 2019 11:01:19 +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 BDE55600C0; Tue, 26 Feb 2019 11:01: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 6733E3FB12; Tue, 26 Feb 2019 11:01:18 +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 x1QB0v1C029729 for ; Tue, 26 Feb 2019 06:00:57 -0500 Received: by smtp.corp.redhat.com (Postfix) id D591760CAC; Tue, 26 Feb 2019 11:00:57 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-70.ams2.redhat.com [10.36.112.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 912FD60BFB; Tue, 26 Feb 2019 11:00:56 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Tue, 26 Feb 2019 11:00:44 +0000 Message-Id: <20190226110046.13145-4-berrange@redhat.com> In-Reply-To: <20190226110046.13145-1-berrange@redhat.com> References: <20190226110046.13145-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 Cc: Andrea Bolognani Subject: [libvirt] [jenkins-ci PATCH v5 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 26 Feb 2019 11:01:19 +0000 (UTC) We can purge any packages which expand to None straight away, and simply convert to a set to get rid of duplicates. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrang=C3=A9 --- guests/lcitool | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 46af92b..88bc945 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -539,8 +539,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 @@ -548,21 +547,17 @@ 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 package not in pkgs: + continue + 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 Tue May 7 07:00:48 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 1551178877427800.5075237079111; Tue, 26 Feb 2019 03:01:17 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6473630016F2; Tue, 26 Feb 2019 11:01:15 +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 191AC6013D; Tue, 26 Feb 2019 11:01:15 +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 A4EFE181A12A; Tue, 26 Feb 2019 11:01:14 +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 x1QB0xmU029734 for ; Tue, 26 Feb 2019 06:00:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 03E4E60BFB; Tue, 26 Feb 2019 11:00:59 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-70.ams2.redhat.com [10.36.112.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E40860BF4; Tue, 26 Feb 2019 11:00:58 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Tue, 26 Feb 2019 11:00:45 +0000 Message-Id: <20190226110046.13145-5-berrange@redhat.com> In-Reply-To: <20190226110046.13145-1-berrange@redhat.com> References: <20190226110046.13145-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 v5 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.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 26 Feb 2019 11:01:16 +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 | 15 +++++++- guests/playbooks/update/tasks/packages.yml | 32 +++++++++++++++++ guests/vars/mappings.yml | 42 +++++++++++++++++++--- 3 files changed, 84 insertions(+), 5 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 88bc945..263ab0d 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 @@ -302,6 +303,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", description=3D"libvirt CI guest management tool", @@ -424,6 +427,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) @@ -540,7 +552,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"]: 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 8ff2f34..ea46ce4 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: @@ -821,7 +853,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 Tue May 7 07:00:48 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 155117888725997.64261218067918; Tue, 26 Feb 2019 03:01:27 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7959A80F9A; Tue, 26 Feb 2019 11:01:23 +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 41AF65D724; Tue, 26 Feb 2019 11:01:23 +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 DD5C2181A135; Tue, 26 Feb 2019 11:01:22 +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 x1QB10L9029746 for ; Tue, 26 Feb 2019 06:01:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id A7B3260C05; Tue, 26 Feb 2019 11:01:00 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-70.ams2.redhat.com [10.36.112.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8054060BF4; Tue, 26 Feb 2019 11:00:59 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Tue, 26 Feb 2019 11:00:46 +0000 Message-Id: <20190226110046.13145-6-berrange@redhat.com> In-Reply-To: <20190226110046.13145-1-berrange@redhat.com> References: <20190226110046.13145-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 v5 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 26 Feb 2019 11:01:25 +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 263ab0d..0fb30a5 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -367,6 +367,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() @@ -537,10 +541,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"]: @@ -552,25 +569,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 && \\ @@ -581,6 +623,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 ea46ce4..ebf7e60 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 @@ -554,6 +599,7 @@ mappings: =20 netcf: deb: libnetcf-dev + deb-cross-arch: skip rpm: netcf-devel =20 numad: @@ -714,6 +760,7 @@ mappings: =20 python2-devel: deb: python-dev + deb-cross-arch: foreign pkg: python2 rpm: python2-devel =20 @@ -738,6 +785,7 @@ mappings: =20 python3-devel: deb: python3-dev + deb-cross-arch: foreign pkg: python3 Fedora: python3-devel =20 @@ -783,6 +831,7 @@ mappings: =20 readline: deb: libreadline-dev + deb-cross-arch: foreign pkg: readline rpm: readline-devel =20 @@ -797,6 +846,7 @@ mappings: =20 sanlock: deb: libsanlock-dev + deb-cross-arch: foreign rpm: sanlock-devel =20 screen: @@ -818,6 +868,7 @@ mappings: =20 spice-gtk3: deb: libspice-client-gtk-3.0-dev + deb-cross-arch: foreign pkg: spice-gtk rpm: spice-gtk3-devel =20 @@ -849,10 +900,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 @@ -860,6 +913,7 @@ mappings: =20 xfsprogs: deb: xfslibs-dev + deb-cross-arch: foreign rpm: xfsprogs-devel =20 xmllint: @@ -872,14 +926,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 @@ -890,8 +947,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