composer+worker: make dnf-json path externally configurable

The default value is the installation path.
This commit is contained in:
Achilleas Koutsou 2022-04-27 15:34:12 +02:00 committed by Tom Gundersen
parent 8070321169
commit 6fbddeea35
4 changed files with 12 additions and 3 deletions

View file

@ -74,6 +74,7 @@ func NewComposer(config *ComposerConfigFile, stateDir, cacheDir string) (*Compos
logrus.Infof("Loaded %d distros", len(c.distros.List()))
c.solver = dnfjson.NewBaseSolver(path.Join(c.cacheDir, "rpmmd"))
c.solver.SetDNFJSONPath(c.config.DNFJson)
var jobs jobqueue.JobQueue
if config.Worker.PGDatabase != "" {

View file

@ -17,6 +17,7 @@ type ComposerConfigFile struct {
SyslogServer string `toml:"syslog_server" env:"SYSLOG_SERVER"`
LogLevel string `toml:"log_level"`
LogFormat string `toml:"log_format"`
DNFJson string `toml:"dnf-json"`
}
type KojiAPIConfig struct {
@ -108,6 +109,7 @@ func GetDefaultConfig() *ComposerConfigFile {
},
LogLevel: "info",
LogFormat: "text",
DNFJson: "/usr/libexec/osbuild-composer/dnf-json",
}
}