From 9b9e65910d72e19b9a922af73130a69453703df2 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Wed, 4 Dec 2024 02:52:07 +0000 Subject: [PATCH] fix: media-types are fixed --- go.mod | 2 +- go.sum | 4 ++-- pkg/types/layer_type.go | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 94ea650b..37028cbc 100644 --- a/go.mod +++ b/go.mod @@ -289,6 +289,6 @@ require ( replace ( github.com/opencontainers/umoci => github.com/project-stacker/umoci v0.0.0-20240906174318-e9397ba4ced0 - machinerun.io/atomfs => github.com/rchincha/atomfs v0.0.0-20241202055124-ec75088f9adc + machinerun.io/atomfs => github.com/rchincha/atomfs v0.0.0-20241204024552-68b03282581c stackerbuild.io/stacker-bom => github.com/project-stacker/stacker-bom v0.0.0-20240509203427-4d685e046780 ) diff --git a/go.sum b/go.sum index 1fafd65b..70f3c5de 100644 --- a/go.sum +++ b/go.sum @@ -818,8 +818,8 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rchincha/atomfs v0.0.0-20241202055124-ec75088f9adc h1:gMkzDlZoVwZia1hxClVziZkxs4YS59kWEmxnT3TKfR4= -github.com/rchincha/atomfs v0.0.0-20241202055124-ec75088f9adc/go.mod h1:woheEy3EVXE+AFLGwmBRSMtmcOKBM71qiDEYaq7Nwng= +github.com/rchincha/atomfs v0.0.0-20241204024552-68b03282581c h1:bZ5FHJXuXq02Zz0Kn9WYEsIl34GB/zO+K96FqFQ9ii0= +github.com/rchincha/atomfs v0.0.0-20241204024552-68b03282581c/go.mod h1:woheEy3EVXE+AFLGwmBRSMtmcOKBM71qiDEYaq7Nwng= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= diff --git a/pkg/types/layer_type.go b/pkg/types/layer_type.go index 354b3475..ab11e440 100644 --- a/pkg/types/layer_type.go +++ b/pkg/types/layer_type.go @@ -73,20 +73,20 @@ func NewLayerTypeManifest(manifest ispec.Manifest) (LayerType, error) { case squashfs.BaseMediaTypeLayerSquashfs: // older stackers generated media types without compression information fallthrough - case squashfs.GenerateSquashfsMediaType(squashfs.GzipCompression, verity.VerityMetadataMissing): + case squashfs.GenerateSquashfsMediaType(squashfs.GzipCompression): fallthrough - case squashfs.GenerateSquashfsMediaType(squashfs.ZstdCompression, verity.VerityMetadataMissing): + case squashfs.GenerateSquashfsMediaType(squashfs.ZstdCompression): return NewLayerType("squashfs", verity.VerityMetadataMissing) - case squashfs.GenerateSquashfsMediaType(squashfs.GzipCompression, verity.VerityMetadataPresent): + case squashfs.GenerateSquashfsMediaType(squashfs.GzipCompression): fallthrough - case squashfs.GenerateSquashfsMediaType(squashfs.ZstdCompression, verity.VerityMetadataPresent): + case squashfs.GenerateSquashfsMediaType(squashfs.ZstdCompression): return NewLayerType("squashfs", verity.VerityMetadataPresent) case erofs.BaseMediaTypeLayerErofs: // older stackers generated media types without compression information fallthrough - case erofs.GenerateErofsMediaType(erofs.LZ4HCCompression, verity.VerityMetadataMissing): + case erofs.GenerateErofsMediaType(erofs.LZ4HCCompression): return NewLayerType("erofs", verity.VerityMetadataMissing) - case erofs.GenerateErofsMediaType(erofs.LZ4HCCompression, verity.VerityMetadataPresent): + case erofs.GenerateErofsMediaType(erofs.LZ4HCCompression): return NewLayerType("erofs", verity.VerityMetadataPresent) case ispec.MediaTypeImageLayerGzip: fallthrough