mirror of https://github.com/xemu-project/xemu.git
docs/devel: update and clarify lcitool instructions
Shorten a bit the description of what libvirt-ci does, the name of the data files is not relevant at that point. However, the procedures to add new build prerequisites are lacking some information, particularly with respect to regenerating the output test files for lcitool's unit tests. While at it, also update the paths in the libvirt-ci repository. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
586d3bb944
commit
fa1ce1dda9
|
@ -429,49 +429,55 @@ using the ``lcitool`` program provided by the ``libvirt-ci`` project:
|
||||||
|
|
||||||
https://gitlab.com/libvirt/libvirt-ci
|
https://gitlab.com/libvirt/libvirt-ci
|
||||||
|
|
||||||
In that project, there is a ``mappings.yml`` file defining the distro native
|
``libvirt-ci`` contains an ``lcitool`` program as well as a list of
|
||||||
package names for a wide variety of third party projects. This is processed
|
mappings to distribution package names for a wide variety of third
|
||||||
in combination with a project defined list of build pre-requisites to determine
|
party projects. ``lcitool`` applies the mappings to a list of build
|
||||||
the list of native packages to install on each distribution. This can be used
|
pre-requisites in ``tests/lcitool/projects/qemu.yml``, determines the
|
||||||
to generate dockerfiles, VM package lists and Cirrus CI variables needed to
|
list of native packages to install on each distribution, and uses them
|
||||||
setup build environments across OS distributions with a consistent set of
|
to generate build environments (dockerfiles and Cirrus CI variable files)
|
||||||
packages present.
|
that are consistent across OS distribution.
|
||||||
|
|
||||||
When preparing a patch series that adds a new build pre-requisite to QEMU,
|
|
||||||
updates to various lcitool data files may be required.
|
|
||||||
|
|
||||||
|
|
||||||
Adding new build pre-requisites
|
Adding new build pre-requisites
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
When preparing a patch series that adds a new build
|
||||||
|
pre-requisite to QEMU, the prerequisites should to be added to
|
||||||
|
``tests/lcitool/projects/qemu.yml`` in order to make the dependency
|
||||||
|
available in the CI build environments.
|
||||||
|
|
||||||
In the simple case where the pre-requisite is already known to ``libvirt-ci``
|
In the simple case where the pre-requisite is already known to ``libvirt-ci``
|
||||||
the following steps are needed
|
the following steps are needed:
|
||||||
|
|
||||||
* Edit ``tests/lcitool/projects/qemu.yml`` and add the pre-requisite
|
* Edit ``tests/lcitool/projects/qemu.yml`` and add the pre-requisite
|
||||||
|
|
||||||
* Run ``make lcitool-refresh`` to re-generate all relevant build environment
|
* Run ``make lcitool-refresh`` to re-generate all relevant build environment
|
||||||
manifests
|
manifests
|
||||||
|
|
||||||
In some cases ``libvirt-ci`` will not know about the build pre-requisite and
|
It may be that ``libvirt-ci`` does not know about the new pre-requisite.
|
||||||
thus some extra preparation steps will be required first
|
If that is the case, some extra preparation steps will be required
|
||||||
|
first to contribute the mapping to the ``libvirt-ci`` project:
|
||||||
|
|
||||||
* Fork the ``libvirt-ci`` project on gitlab
|
* Fork the ``libvirt-ci`` project on gitlab
|
||||||
|
|
||||||
* Edit the ``mappings.yml`` change to add an entry for the new build
|
* Add an entry for the new build prerequisite to
|
||||||
prerequisite, listing its native package name on as many OS distros
|
``lcitool/facts/mappings.yml``, listing its native package name on as
|
||||||
as practical.
|
many OS distros as practical. Run ``python -m pytest --regenerate-output``
|
||||||
|
and check that the changes are correct.
|
||||||
|
|
||||||
* Commit the ``mappings.yml`` change and submit a merge request to
|
* Commit the ``mappings.yml`` change together with the regenerated test
|
||||||
the ``libvirt-ci`` project, noting in the description that this
|
files, and submit a merge request to the ``libvirt-ci`` project.
|
||||||
is a new build pre-requisite desired for use with QEMU
|
Please note in the description that this is a new build pre-requisite
|
||||||
|
desired for use with QEMU.
|
||||||
|
|
||||||
* CI pipeline will run to validate that the changes to ``mappings.yml``
|
* CI pipeline will run to validate that the changes to ``mappings.yml``
|
||||||
are correct, by attempting to install the newly listed package on
|
are correct, by attempting to install the newly listed package on
|
||||||
all OS distributions supported by ``libvirt-ci``.
|
all OS distributions supported by ``libvirt-ci``.
|
||||||
|
|
||||||
* Once the merge request is accepted, go back to QEMU and update
|
* Once the merge request is accepted, go back to QEMU and update
|
||||||
the ``libvirt-ci`` submodule to point to a commit that contains
|
the ``tests/lcitool/libvirt-ci`` submodule to point to a commit that
|
||||||
the ``mappings.yml`` update.
|
contains the ``mappings.yml`` update. Then add the prerequisite and
|
||||||
|
run ``make lcitool-refresh``.
|
||||||
|
|
||||||
|
|
||||||
Adding new OS distros
|
Adding new OS distros
|
||||||
|
@ -498,18 +504,20 @@ Assuming there is agreement to add a new OS distro then
|
||||||
|
|
||||||
* Fork the ``libvirt-ci`` project on gitlab
|
* Fork the ``libvirt-ci`` project on gitlab
|
||||||
|
|
||||||
* Add metadata under ``guests/lcitool/lcitool/ansible/group_vars/``
|
* Add metadata under ``lcitool/facts/targets/`` for the new OS
|
||||||
for the new OS distro. There might be code changes required if
|
distro. There might be code changes required if the OS distro
|
||||||
the OS distro uses a package format not currently known. The
|
uses a package format not currently known. The ``libvirt-ci``
|
||||||
``libvirt-ci`` maintainers can advise on this when the issue
|
maintainers can advise on this when the issue is filed.
|
||||||
is file.
|
|
||||||
|
|
||||||
* Edit the ``mappings.yml`` change to update all the existing package
|
* Edit the ``lcitool/facts/mappings.yml`` change to add entries for
|
||||||
entries, providing details of the new OS distro
|
the new OS, listing the native package names for as many packages
|
||||||
|
as practical. Run ``python -m pytest --regenerate-output`` and
|
||||||
|
check that the changes are correct.
|
||||||
|
|
||||||
* Commit the ``mappings.yml`` change and submit a merge request to
|
* Commit the changes to ``lcitool/facts`` and the regenerated test
|
||||||
the ``libvirt-ci`` project, noting in the description that this
|
files, and submit a merge request to the ``libvirt-ci`` project.
|
||||||
is a new build pre-requisite desired for use with QEMU
|
Please note in the description that this is a new build pre-requisite
|
||||||
|
desired for use with QEMU
|
||||||
|
|
||||||
* CI pipeline will run to validate that the changes to ``mappings.yml``
|
* CI pipeline will run to validate that the changes to ``mappings.yml``
|
||||||
are correct, by attempting to install the newly listed package on
|
are correct, by attempting to install the newly listed package on
|
||||||
|
|
Loading…
Reference in New Issue