Skip to content

Commit

Permalink
[do not merge] test image-spec with embedded Platform
Browse files Browse the repository at this point in the history
testing "embed_platform" branch from opencontainers/image-spec#949

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Sep 9, 2022
1 parent 924edb9 commit 6b0daf2
Show file tree
Hide file tree
Showing 219 changed files with 12,941 additions and 6,012 deletions.
2 changes: 1 addition & 1 deletion builder/builder-next/executor_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type bridgeProvider struct {
Root string
}

func (p *bridgeProvider) New() (network.Namespace, error) {
func (p *bridgeProvider) New(hostname string) (network.Namespace, error) {
n, err := p.NetworkByName(networkName)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion builder/builder-next/exporter/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (e *imageExporterInstance) Config() exporter.Config {
}
}

func (e *imageExporterInstance) Export(ctx context.Context, inp exporter.Source, sessionID string) (map[string]string, error) {
func (e *imageExporterInstance) Export(ctx context.Context, inp *exporter.Source, sessionID string) (map[string]string, error) {
if len(inp.Refs) > 1 {
return nil, fmt.Errorf("exporting multiple references to image store is currently unsupported")
}
Expand Down
4 changes: 1 addition & 3 deletions builder/builder-next/exporter/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import (
func emptyImageConfig() ([]byte, error) {
pl := platforms.Normalize(platforms.DefaultSpec())
img := ocispec.Image{
Architecture: pl.Architecture,
OS: pl.OS,
Variant: pl.Variant,
Platform: pl,
}
img.RootFS.Type = "layers"
img.Config.WorkingDir = "/"
Expand Down
5 changes: 5 additions & 0 deletions builder/builder-next/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ func (w *Worker) ResolveOp(v solver.Vertex, s frontend.FrontendLLBBridge, sm *se
return nil, errors.Errorf("could not resolve %v", v)
}

// BuildkitVersion returns BuildkitVersion
func (w *Worker) BuildkitVersion() client.BuildkitVersion {
return client.BuildkitVersion{}
}

// ResolveImageConfig returns image config for an image
func (w *Worker) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt, sm *session.Manager, g session.Group) (digest.Digest, []byte, error) {
return w.ImageSource.ResolveImageConfig(ctx, ref, opt, sm, g)
Expand Down
34 changes: 20 additions & 14 deletions vendor.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,30 @@ require (
github.com/klauspost/compress v1.15.9
github.com/miekg/dns v1.1.27
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible
github.com/moby/buildkit v0.10.4
github.com/moby/buildkit v0.10.4 // FIXME: see replace
github.com/moby/ipvs v1.0.2
github.com/moby/locker v1.0.1
github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0a
github.com/moby/sys/mount v0.3.3
github.com/moby/sys/mountinfo v0.6.2
github.com/moby/sys/sequential v0.0.0-20220829095930-b22ba8a69b30
github.com/moby/sys/sequential v0.5.0
github.com/moby/sys/signal v0.7.0
github.com/moby/sys/symlink v0.2.0
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
github.com/morikuni/aec v1.0.0
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1
github.com/opencontainers/runc v1.1.2
github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1 // FIXME: see replace
github.com/opencontainers/runc v1.1.3
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417
github.com/opencontainers/selinux v1.10.1
github.com/pelletier/go-toml v1.9.4
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.12.1
github.com/prometheus/client_golang v1.12.2
github.com/rootless-containers/rootlesskit v1.0.0
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274
github.com/tonistiigi/fsutil v0.0.0-20220510150904-0dbf3a8a7d58
github.com/tonistiigi/go-archvariant v1.0.0
github.com/vbatts/tar-split v0.11.2
github.com/vishvananda/netlink v1.2.1-beta.2
Expand All @@ -82,9 +82,9 @@ require (
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa
google.golang.org/grpc v1.45.0
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6
google.golang.org/grpc v1.47.0
gotest.tools/v3 v3.2.0
)

Expand All @@ -98,8 +98,7 @@ require (
github.com/container-storage-interface/spec v1.5.0 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/containerd/go-runc v1.0.0 // indirect
github.com/containerd/stargz-snapshotter v0.11.3 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.11.3 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.12.0 // indirect
github.com/containerd/ttrpc v1.1.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
Expand All @@ -125,9 +124,11 @@ require (
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.3.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
github.com/onsi/ginkgo v1.16.4 // indirect
github.com/onsi/gomega v1.17.0 // indirect
github.com/phayes/permbits v0.0.0-20190612203442-39d7c581d2ee // indirect
github.com/philhofer/fwd v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
Expand Down Expand Up @@ -155,13 +156,14 @@ require (
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/api v0.54.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)

replace (
Expand All @@ -173,6 +175,10 @@ replace (
// module go.etcd.io/etcd/server/v3 has upgraded its dependency on
// go.opentelemetry.io/otel to v1.
github.com/google/certificate-transparency-go => github.com/google/certificate-transparency-go v1.0.20
// FIXME: testing "test_image_spec" branch from https://github.com/moby/buildkit/pull/3102
github.com/moby/buildkit => github.com/thaJeztah/buildkit v0.0.0-20220909221023-9b391e65ec47
// FIXME: testing "embed_platform" branch from https://github.com/opencontainers/image-spec/pull/949
github.com/opencontainers/image-spec => github.com/thaJeztah/image-spec v1.0.2-0.20220908165244-ca2e500b1693
// Removes etcd dependency
github.com/rexray/gocsi => github.com/dperny/gocsi v1.2.3-pre
)
Loading

0 comments on commit 6b0daf2

Please sign in to comment.