Add support for RPM customizations
Add support for RPM customizations, which currently allow to import RPM GPG key from a file installed in the image. This is e.g. done for the Azure RHUI image type. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
7d22c42ad7
commit
26dd54a4d7
14 changed files with 303 additions and 185 deletions
|
|
@ -432,6 +432,14 @@ func (request *ComposeRequest) GetCustomizationsFromBlueprintRequest() (*bluepri
|
|||
}
|
||||
}
|
||||
|
||||
if rpm := rbpc.Rpm; rpm != nil && rpm.ImportKeys != nil {
|
||||
c.RPM = &blueprint.RPMCustomization{
|
||||
ImportKeys: &blueprint.RPMImportKeys{
|
||||
Files: *rpm.ImportKeys.Files,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
return c, nil
|
||||
}
|
||||
|
||||
|
|
@ -912,6 +920,14 @@ func (request *ComposeRequest) GetBlueprintFromCustomizations() (blueprint.Bluep
|
|||
bp.Customizations.Installer = installer
|
||||
}
|
||||
|
||||
if request.Customizations.Rpm != nil && request.Customizations.Rpm.ImportKeys != nil {
|
||||
bp.Customizations.RPM = &blueprint.RPMCustomization{
|
||||
ImportKeys: &blueprint.RPMImportKeys{
|
||||
Files: *request.Customizations.Rpm.ImportKeys.Files,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Did bp.Customizations get set at all? If not, set it back to nil
|
||||
if reflect.DeepEqual(*bp.Customizations, blueprint.Customizations{}) {
|
||||
bp.Customizations = nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue