From 9062d9de5225bdec0436bd0484e39dc883c4cf87 Mon Sep 17 00:00:00 2001 From: unclegedd Date: Mon, 20 May 2024 16:12:17 -0500 Subject: [PATCH] WIP --- src/pkg/bundler/fetcher/local.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pkg/bundler/fetcher/local.go b/src/pkg/bundler/fetcher/local.go index 96851e6e..ef1c3dcb 100644 --- a/src/pkg/bundler/fetcher/local.go +++ b/src/pkg/bundler/fetcher/local.go @@ -123,7 +123,7 @@ func (f *localFetcher) toBundle(pkgTmp string) ([]ocispec.Descriptor, error) { // filter out optional components createFilter := filters.Combine( - filters.ByLocalOS(runtime.GOOS), + filters.ByLocalOS(runtime.GOOS), // todo: should we use config.Arch? filters.ForDeploy(strings.Join(f.pkg.OptionalComponents, ","), false), ) @@ -229,7 +229,10 @@ func (f *localFetcher) toBundle(pkgTmp string) ([]ocispec.Descriptor, error) { } } + // todo: also remove unnecessary component tarballs + // ensure zarf.yaml, checksums and SBOMS (if exists) are always included + // note you may have extra SBOMs because they are not filtered out alwaysInclude := []string{pkgPaths.ZarfYAML, pkgPaths.Checksums} if pkgPaths.SBOMs.Path != "" { alwaysInclude = append(alwaysInclude, pkgPaths.SBOMs.Path)