Commit graph

5 commits

Author SHA1 Message Date
Michael Vogt
65a7ce2461 sources: relax "mirror" regexp to follow upstream repo ID
This commit relaxes the "mirror" schema regex from only allow
hashes to the repo ID regex as described in
https://dnf.readthedocs.io/en/latest/conf_ref.html#description

This is needed because in e.g. bootc-image-builder we use
"SetRootDir()" to get the repository information from an existing
bootc image and there the repo_id (that is then used as the mirror_id)
is written in a human friendly way instead of hex.

Thanks to Tomáš Hozza for the suggestions and background info, see
https://github.com/osbuild/osbuild/pull/1974#issuecomment-2579325272
2025-01-14 08:19:16 +01:00
Michael Vogt
b2a34d8b33 sources: add org.osbuild.mtls secret support to librepo source
This commit adds support for the `org.osbuild.mtls` sources and
adds a test.

Note that it reuses the `OSBUILD_SOURCES_CURL_` - this may or
may not be desired, it is certainly simpler this way and librepo
is using libcurl as well internally but it feels a bit messy so
maybe we want to rename the env?
2025-01-14 08:19:16 +01:00
Michael Vogt
b97274dd2f sources: skip librepo test if no librepo can be imported
The librepo test has a similar issue as the dnf tests, we need
to use the system packages, c.f.
https://github.com/osbuild/containers/pull/79
2025-01-14 08:19:16 +01:00
Michael Vogt
460d743b99 sources: test schema validation for librepo
This commit adds a test for the librepo schema validation.
2025-01-14 08:19:16 +01:00
Michael Vogt
a0b4445f3b sources: add unit tests for org.osbuild.librepo
This commit adds unit a basic test for librepo and also updates
the code to the latest requirements to provide "fetch_all".

It also fixes a bug in the handling of org.osbuild.rhsm secrets.
2025-01-14 08:19:16 +01:00