Skip to content

Draft: guest: support remote project package listings

It is desirable for projects to be able to maintain their package listings in their local repos, so they can update their dependencies without needing a lock-step change in the libvirt-ci git repo.

At the same time though, it is useful for libvirt-ci to be able to access package listings for all projects. For example, libvirt-perl depends on libvirt for its build, so needs to know about the libvirt package listings.

It is undesirable to duplicate the package listings in libvirt-ci as that introduces a synchronization requirement and potential failure point.

We can address this by supporting an alternative syntax for the project.yml package files

   ---
   include: URL

When seeing this key, we will fetch the specified URL using urllib, and then parse it as a normal project.yml package file.

The second patch is obviously not something we can merge yet, as it points to me private QEMU fork, but it serves to demonstrate this impl actually working for sake of testing.

Ultimately I can see all of the existing libvirt package yml files being moved into their respective projects.

In future we might also consider allowing the include URL to have placeholders for the branch name, along with a way to specify the desired branchname for each project.

eg you could consider

   $ lcitool dockerfile fedora-34 libvirt-dbus,libvirt-glib,libvirt

as implying 'master' branch, and then

   $ lcitool dockerfile fedora-34 libvirt-dbus,libvirt-glib,libvirt:v5.1-maint

as requesting the "v5.1-maint" branch of libvirt, but master branch of libvirt-dbus and libvirt-glib.

This branch name can then be substituted into the URL to fetch the package deps.

NB, I'm not intending to impl the branch name stuff now, unless someone has a pressing need for it, since libvirt projects don't do stable branches currently.

It might be useful for QEMU though, which does have stable branches periodically.

Edited by Daniel P. Berrangé

Merge request reports