debian-forge/tools
Achilleas Koutsou 629f171f72 tools/osbuild-depsolve-dnf5: load repos from dir
Support loading repositories from a root tree instead of supplying them
with the request.  The repositories should be in the standard yum repo
format.  Both repository sources can be defined simultaneously, but at
least one is required.

The root_dir is expected to contain files necessary for depsolving in
the standard paths.

These files are:
- Repository (.repo) configurations in <root_dir>/etc/yum.repos.d/
- GPG key files in <root_dir>/etc/pki/rpm-gpg/
    - This will be used to resolve gpg key paths specified in the .repo
      files that are relative to the root_dir.
- (Optional) Custom dnf config variables in <root_dir>/etc/dnf/vars or
  <root_dir>/usr/share/dnf5/vars.d.
    - This is used by CentOS Stream to set the value of $stream.

Custom repository configurations in arbitrary (non-root) paths will have
to follow this directory structure.

A new variable is added to the request, `releasever`, which is mandatory
when using `root_dir`.  This variable is used in repository URLs and GPG
key paths.  In the default case, dnf reads this variable by inspecting
the rpm database.  We will override it in the Solver the same way we
override the arch and basearch for variable substitution.  In the
future, we will make this variable mandatory in all cases, which will
make the variable available for repo configs defined in the request as
well.

The root_dir is used in three ways:
- Set the base.conf.installroot
- Set the base.conf.varsdir to <root_dir>/usr/share/dnf5/vars.d and
  <root_dir>/etc/dnf/vars to read resolve custom variables when loading
  repositories.
- Call create_repos_from_dir() with <root_dir>/etc/yum.repos.d.

base.setup() should be called before loading repositories otherwise
substitutions might not work.
See https://github.com/rpm-software-management/dnf5/issues/1374#issuecomment-2038995031
2024-04-10 16:22:13 -07:00
..
check-runners tools: add "tools" dir to LINTABLES and fix issues 2023-11-13 10:10:12 +01:00
check-snapshots check-snapshots: add log info when a download fails 2024-02-20 14:52:23 -08:00
gen-stage-test-diff tools: make gen-stage-test-diff pylint clean 2024-02-20 14:52:23 -08:00
inline-source.py tools: add inline-source.py 2021-05-12 14:26:16 +02:00
lorax-template-pkgs.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
osbuild mpp: combine depsolve and import into mpp.py 2021-06-30 20:26:07 +01:00
osbuild-depsolve-dnf tools/osbuild-depsolve-dnf: match dnf repo props 2024-04-10 16:22:13 -07:00
osbuild-depsolve-dnf5 tools/osbuild-depsolve-dnf5: load repos from dir 2024-04-10 16:22:13 -07:00
osbuild-dev lint: explicit check 2024-03-05 16:10:27 +01:00
osbuild-json-seq-progress-example-renderer tools: add example json-seq render based on tqdm 2024-03-12 16:44:12 +01:00
osbuild-mpp osbuild-mpp: Expend information in PkgInfo 2024-04-03 10:29:49 +02:00
set-env-variables.sh tools: add set-env-variables.sh 2022-04-13 14:57:27 +02:00
tree-diff tools/tree-diff: make its output stable 2023-08-08 12:41:17 +02:00