[libvirt-ci PATCH] guests: introduce libvirt-dist and libvirt-minimal projects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The language bindings have traditionally built against a full libvirt,
however, this is serious overkill because all they should really need
most of the time is access to the main API, and the test driver if they
want to run functional tests. The full libvirt build with virt drivers
is only needed for integration testing which most bindings won't do.

Thus this introduces a new project "libvirt-minimal" which lists the
bare minimum dependencies required to build libvirt.

Taking libvirt-perl as an example, if creating a container using the
current "libvirt,libvirt-perl" project set, the result with 1.4 GB
in size for Fedora 31. With the "libvirt-minimal,libvirt-perl" set,
the size is just 777 MB.

Some projects also wish to have the ability to build against the distro
provided libvirt instead of the latest git master, and for this purpose
a "libvirt-dist" project is defined which pulls in the package needed
for building against the distro libvirt.

In the lcitool dockerfile command, there is a check that the requested
project is configured against the requested host. These new projects are
not listed against any host, because we don't want them installed by
default in the VMs. Thus the dockerfile check is no longer valid and is
removed. Whomever is invoking lcitool knows what combination they want
and whether it will work.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 guests/lcitool                           |  7 -------
 guests/vars/mappings.yml                 |  5 +++++
 guests/vars/projects/libvirt-dist.yml    |  3 +++
 guests/vars/projects/libvirt-minimal.yml | 13 +++++++++++++
 4 files changed, 21 insertions(+), 7 deletions(-)
 create mode 100644 guests/vars/projects/libvirt-dist.yml
 create mode 100644 guests/vars/projects/libvirt-minimal.yml

diff --git a/guests/lcitool b/guests/lcitool
index 0c89e13..abc87d2 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -1007,13 +1007,6 @@ class Application:
         for project in projects:
             if project.rfind("+mingw") >= 0:
                 raise Exception("Obsolete syntax, please use --cross-arch")
-            if project not in facts["projects"]:
-                raise Exception(
-                    "Host {} doesn't support project {}".format(
-                        host,
-                        project,
-                    )
-                )
 
         varmap = self._dockerfile_build_varmap(facts, mappings, pip_mappings, projects, cross_arch)
         self._dockerfile_format(facts, cross_arch, varmap)
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index 753f0fe..a9ab3d5 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -450,6 +450,11 @@ mappings:
     rpm: libuuid-devel
     cross-policy-deb: foreign
 
+  libvirt-devel:
+    rpm: libvirt-devel
+    deb: libvirt-dev
+    pkg: libvirt
+
   libxml2:
     deb: libxml2-dev
     pkg: libxml2
diff --git a/guests/vars/projects/libvirt-dist.yml b/guests/vars/projects/libvirt-dist.yml
new file mode 100644
index 0000000..aa95f23
--- /dev/null
+++ b/guests/vars/projects/libvirt-dist.yml
@@ -0,0 +1,3 @@
+---
+packages:
+  - libvirt-devel
diff --git a/guests/vars/projects/libvirt-minimal.yml b/guests/vars/projects/libvirt-minimal.yml
new file mode 100644
index 0000000..9402c4f
--- /dev/null
+++ b/guests/vars/projects/libvirt-minimal.yml
@@ -0,0 +1,13 @@
+---
+packages:
+  - glib2
+  - gnutls
+  - libnl3
+  - libnlroute3
+  - libpcap
+  - libtirpc
+  - libxml2
+  - python3-docutils
+  - rpcgen
+  - xmllint
+  - xsltproc
-- 
2.25.4





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux