Commit graph

65 commits

Author SHA1 Message Date
Lars Karlitski
839a109c78 weldr: ensure a fresh dnf cache when making a new compose
dnf-json relies on dnf's ability to cache repository metadata. This is
important, because the API calls it quite often to serve requests for
package lists and depsolves.

However, osbuild's dnf stage always fetches new metadata, because it
doesn't have access to the host's cache. Since metadata is valid for
some time, even after a repository changed, the checksum we put in
the pipeline might be old.

Force a new metadata download when producing the pipeline. This is still
not perfect, but greatly reduces the probability of putting stale
metadata into the pipeline.
2019-12-19 21:46:02 +01:00
Lars Karlitski
305b2dda5c rpmmd: add IgnoreSSL key to RepoConfig
This is the opposite of dnf.conf's `sslverify`, because go's default for
booleans is always false. This is error prone: we'd like to default to
true.
2019-12-12 01:27:04 +00:00
Lars Karlitski
d3a0b788a2 distro: set the repository checksum dynamically
Instead of having a static repository checksum, set it dynamically from
the metadata that osbuild-composer last saw. This is implemented in
dnf-json, which returns the checksums for each repository on every call.

This enables the use of repositories that change over time, such as
fedora-updates. Note that the osbuild pipeline will break when such a
repository changes. This is intentional: pipelines have to be
reproducible.
2019-12-10 20:38:22 +01:00
Ondřej Budai
36ccb110b3 api: add support for /projects/depsolve 2019-11-13 14:54:02 +01:00
Ondřej Budai
9076f68f7b rpmmd: Add error reporting support to dnf-json
Previously dnf-json hasn't been able to report any reports. This commit
tries to fix it with introduction of somewhat flexible error format.
2019-11-13 14:54:02 +01:00
Lars Karlitski
41a2ef9b9a Revert "rpmmd: make dnf-json executable"
This is not really necessary right now. I needed it for testing rpmmd,
which we've postponed.

This reverts commit d05673afb1.
2019-11-13 00:36:50 +01:00
Lars Karlitski
d13e24a91e dnf-json: use dnf.Base.install_specs()
This method also accepts modules with the `@` syntax.
2019-11-11 18:30:44 +01:00
Lars Karlitski
d05673afb1 rpmmd: make dnf-json executable
This enables us to put it anywhere in `PATH`, because we don't call it
through `python3` anymore.
2019-11-11 18:30:44 +01:00
Ondřej Budai
4d4da93240 dnf-json: fix depsolve command
When argument passing was switched from command line to stdin in cae1fdd,
depsolve command was broken. This commit fixes it.
2019-11-08 13:53:22 +01:00
Lars Karlitski
0616844a25 dnf-json: remove 'list' command
It's not used by anything.
2019-11-04 00:17:25 +01:00
Lars Karlitski
c3e029ae82 dnf-json: don't hard-code Fedora 30
Make each command accept a `repos` key containing repository
descriptions.

Make weldr API pass the repository like this. Nothing should change,
because the repos were the same (Fedora 30).
2019-11-04 00:17:25 +01:00
Lars Karlitski
8ed07ed9cb dnf-json: move releasever and basearch into URL 2019-11-04 00:17:25 +01:00
Lars Karlitski
cae1fdd04d dnf-json: read arguments as JSON from stdin
This allows us to have more expressive input arguments.
2019-11-04 00:17:25 +01:00
Ondřej Budai
deb763c13b dnf-json: Remove custom dnf cache directory
When osbuild-composer is run as systemd service, we don't want to write
anything into working directory. Currently, we write dnf cache into it.
Instead, let's just use the default dnf cache directory.
2019-10-14 23:45:53 +02:00
Lars Karlitski
1adbf1a4a6 osbuild-composer 2019-09-13 18:50:13 +02:00