Change RepoConfig.GPGKey to an array of key strings
DNF supports more than one GPG key. It is possible that one may be used for signing packages, and another to sign the repository metadata. This renamed GPGKey to GPGKeys internally. It does not change the on-disk repository json format.
This commit is contained in:
parent
a47375a10d
commit
d12447408b
12 changed files with 114 additions and 63 deletions
|
|
@ -187,12 +187,17 @@ func makeManifestJob(name string, imgType distro.ImageType, cr composeRequest, d
|
|||
type DistroArchRepoMap map[string]map[string][]repository
|
||||
|
||||
func convertRepo(r repository) rpmmd.RepoConfig {
|
||||
var keys []string
|
||||
if r.GPGKey != "" {
|
||||
keys = []string{r.GPGKey}
|
||||
}
|
||||
|
||||
return rpmmd.RepoConfig{
|
||||
Name: r.Name,
|
||||
BaseURL: r.BaseURL,
|
||||
Metalink: r.Metalink,
|
||||
MirrorList: r.MirrorList,
|
||||
GPGKey: r.GPGKey,
|
||||
GPGKeys: keys,
|
||||
CheckGPG: r.CheckGPG,
|
||||
MetadataExpire: r.MetadataExpire,
|
||||
ImageTypeTags: r.ImageTypeTags,
|
||||
|
|
|
|||
|
|
@ -140,12 +140,18 @@ func main() {
|
|||
if repoName == "" {
|
||||
repoName = fmt.Sprintf("repo-%d", i)
|
||||
}
|
||||
|
||||
var keys []string
|
||||
if repo.GPGKey != "" {
|
||||
keys = []string{repo.GPGKey}
|
||||
}
|
||||
|
||||
repos[i] = rpmmd.RepoConfig{
|
||||
Name: repoName,
|
||||
BaseURL: repo.BaseURL,
|
||||
Metalink: repo.Metalink,
|
||||
MirrorList: repo.MirrorList,
|
||||
GPGKey: repo.GPGKey,
|
||||
GPGKeys: keys,
|
||||
CheckGPG: repo.CheckGPG,
|
||||
PackageSets: repo.PackageSets,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue