Pipelines encode which source content they need in the form of repository metadata checksums (or rpm checksums). In addition, they encode where they fetch that source content from in the form of URLs. This is overly specific and doesn't have to be in the pipeline's hash: the checksum is enough to specify an image. In practice, this precluded using alternative ways of getting at source packages, such as local mirrors, which could speed up development. Introduce a new osbuild API: sources. With it, a stage can query for a way to fetch source content based on checksums. The first such source is `org.osbuild.dnf`, which returns repository configuration for a metadata checksum. Note that the dnf stage continues to verify that the content it received matches the checksum it expects. Sources are implemented as programs, living in a `sources` directory. They are run on the host (i.e., uncontained) right now. Each source gets passed options, which are taken from a new command line argument to osbuild, and an array of checksums for which to return content. This API is only available to stages right now. |
||
|---|---|---|
| .. | ||
| pipelines | ||
| stages_tests | ||
| testing-rpms | ||
| .gitignore | ||
| __init__.py | ||
| osbuildtest.py | ||
| README.md | ||
| test_assemblers.py | ||
| test_boot.py | ||
| test_osbuild.py | ||
| test_stageinfo.py | ||
| test_stages.py | ||
Setup
To run the tests in vagrant virtual machine, please follow this tutorial: https://developer.fedoraproject.org/tools/vagrant/vagrant-libvirt.html
(run also sudo systemctl start libvirtd)
Using Vagrant
To start a Vagrant box by hand, run vagrant up in this directory. To stop and remove all volumes run vagrant destroy again in this directory.
Troubleshooting
In case you accidentally deleted .vagrant directory, you can use some of these commands in order to get rid of running instance:
$ virsh list # this should display test_default
$ virsh managedsave-remove test_default
$ virsh undefine test_default
# or using vagrant cli tool
$ vagrant global-status
$ vagrant destroy <id>
$ vagrant global-status --prune