mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-11-03 09:37:34 +00:00
[3.4] podman save: enforce signature removal
Enforce the removal of signatures in `podman save` to restore behavior prior to the migration to libimage. We may consider improving on that in the future. For details, please refer to the excellent summary by @mtrmac [1]. [NO TESTS NEEDED] - manually verified but exisiting tests need some further investigation (see [1]). [1] https://github.com/containers/podman/pull/11669#issuecomment-925250264 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
parent
c58a677f8e
commit
f2c676e99a
3 changed files with 4 additions and 4 deletions
|
|
@ -357,7 +357,6 @@ func ExportImages(w http.ResponseWriter, r *http.Request) {
|
|||
Format: query.Format,
|
||||
MultiImageArchive: len(query.References) > 1,
|
||||
Output: output,
|
||||
RemoveSignatures: true,
|
||||
}
|
||||
|
||||
imageEngine := abi.ImageEngine{Libpod: runtime}
|
||||
|
|
|
|||
|
|
@ -303,8 +303,6 @@ type ImageSaveOptions struct {
|
|||
MultiImageArchive bool
|
||||
// Output - write image to the specified path.
|
||||
Output string
|
||||
// Do not save the signature from the source image
|
||||
RemoveSignatures bool
|
||||
// Quiet - suppress output when copying images
|
||||
Quiet bool
|
||||
}
|
||||
|
|
|
|||
|
|
@ -367,7 +367,10 @@ func (ir *ImageEngine) Load(ctx context.Context, options entities.ImageLoadOptio
|
|||
func (ir *ImageEngine) Save(ctx context.Context, nameOrID string, tags []string, options entities.ImageSaveOptions) error {
|
||||
saveOptions := &libimage.SaveOptions{}
|
||||
saveOptions.DirForceCompress = options.Compress
|
||||
saveOptions.RemoveSignatures = options.RemoveSignatures
|
||||
|
||||
// Force signature removal to preserve backwards compat.
|
||||
// See https://github.com/containers/podman/pull/11669#issuecomment-925250264
|
||||
saveOptions.RemoveSignatures = true
|
||||
|
||||
if !options.Quiet {
|
||||
saveOptions.Writer = os.Stderr
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue