From a65314329c4fbab6f31e21e318039ed322b482d6 Mon Sep 17 00:00:00 2001 From: Kenny Leung Date: Wed, 10 Jul 2024 17:23:09 -0700 Subject: [PATCH 1/2] expose Signed-off-by: Kenny Leung --- pkg/cli/build.go | 2 +- pkg/cli/bundle.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cli/build.go b/pkg/cli/build.go index 73ef6d58..2ded546e 100644 --- a/pkg/cli/build.go +++ b/pkg/cli/build.go @@ -707,7 +707,7 @@ type Global struct { summary string - fuses []string + Fuses []string // arch -> foo.apk -> exists in APKINDEX exists map[string]map[string]struct{} diff --git a/pkg/cli/bundle.go b/pkg/cli/bundle.go index ad0e5c40..a37fb2f1 100644 --- a/pkg/cli/bundle.go +++ b/pkg/cli/bundle.go @@ -20,7 +20,7 @@ import ( "chainguard.dev/apko/pkg/build/types" "github.com/chainguard-dev/clog" - "github.com/google/go-containerregistry/pkg/authn" + "github.com/google/go-containerregistry/pkg/gcrane" "github.com/google/go-containerregistry/pkg/name" v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/empty" @@ -71,7 +71,7 @@ func cmdBundle() *cobra.Command { } if bcfg.Repo != "" { - pusher, err := remote.NewPusher(remote.WithAuthFromKeychain(authn.DefaultKeychain), remote.WithUserAgent("wolfictl bundle")) + pusher, err := remote.NewPusher(remote.WithAuthFromKeychain(gcrane.Keychain), remote.WithUserAgent("wolfictl bundle")) if err != nil { return err } From 663f753c03ac65c984f3cd8e07471f4fbe817954 Mon Sep 17 00:00:00 2001 From: Kenny Leung Date: Wed, 10 Jul 2024 17:26:07 -0700 Subject: [PATCH 2/2] fix Signed-off-by: Kenny Leung --- pkg/cli/bundle.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cli/bundle.go b/pkg/cli/bundle.go index a37fb2f1..f4fb285f 100644 --- a/pkg/cli/bundle.go +++ b/pkg/cli/bundle.go @@ -99,7 +99,7 @@ func cmdBundle() *cobra.Command { cmd.Flags().BoolVar(&cfg.dryrun, "dry-run", false, "print commands instead of executing them") cmd.Flags().StringSliceVarP(&cfg.ExtraKeys, "keyring-append", "k", []string{"https://packages.wolfi.dev/os/wolfi-signing.rsa.pub"}, "path to extra keys to include in the build environment keyring") cmd.Flags().StringSliceVarP(&cfg.ExtraRepos, "repository-append", "r", []string{"https://packages.wolfi.dev/os"}, "path to extra repositories to include in the build environment") - cmd.Flags().StringSliceVar(&cfg.fuses, "gcsfuse", []string{}, "list of gcsfuse mounts to make available to the build environment (e.g. gs://my-bucket/subdir:/mnt/my-bucket)") + cmd.Flags().StringSliceVar(&cfg.Fuses, "gcsfuse", []string{}, "list of gcsfuse mounts to make available to the build environment (e.g. gs://my-bucket/subdir:/mnt/my-bucket)") cmd.Flags().StringVar(&cfg.signingKey, "signing-key", "", "key to use for signing") cmd.Flags().StringVar(&cfg.PurlNamespace, "namespace", "wolfi", "namespace to use in package URLs in SBOM (eg wolfi, alpine)") cmd.Flags().StringVar(&cfg.OutDir, "out-dir", "", "directory where packages will be output") @@ -377,8 +377,8 @@ func BundleAll(ctx context.Context, cfg *Global, bcfg *BundleConfig, args []stri testflags = append(testflags, "--repository-append="+r) } - mounts := make([]*bundle.GCSFuseMount, 0, len(cfg.fuses)) - for _, f := range cfg.fuses { + mounts := make([]*bundle.GCSFuseMount, 0, len(cfg.Fuses)) + for _, f := range cfg.Fuses { mount, err := bundle.ParseGCSFuseMount(f) if err != nil { return nil, err