Skip to content

Commit

Permalink
update dependencies (nix 2.17.0)
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Sep 13, 2023
1 parent cbf79cc commit 3961d2b
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 993 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v4.0.1
uses: docker/metadata-action@v5.0.0
with:
images: ghcr.io/${{ github.repository }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.0.0
uses: docker/setup-buildx-action@v3.0.0
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v2.0.0
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3.1.1
uses: docker/build-push-action@v5.0.0
with:
context: .
file: ./bootstrap.Dockerfile
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.2.0
uses: golangci/golangci-lint-action@v3.7.0
with:
version: v1.50
args: --verbose
version: v1.54.2
args: --verbose --timeout=10m

test-integration:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: "Install test dependencies"
Expand Down
4 changes: 2 additions & 2 deletions bootstrap.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG GOLANG_IMAGE=golang:1.19.2-alpine@sha256:9d3bd0937054ed71c04839c909aec4736b1a83a96010826cfeed4abed12acf59
ARG NIX_IMAGE=nixos/nix:2.11.1@sha256:d8c6b97091d6944dd773c3c239899af047077dbf5411ef229bb50e5b21404b0d
ARG GOLANG_IMAGE=golang:1.21.1-alpine@sha256:96634e55b363cb93d39f78fb18aa64abc7f96d372c176660d7b8b6118939d97b
ARG NIX_IMAGE=nixos/nix:2.17.0@sha256:a186d0501304e87751280b7b6ad62b54b9d08b8c5c63b9752eac408e1159c340

FROM --platform=${BUILDPLATFORM} ${GOLANG_IMAGE} AS build
WORKDIR /src
Expand Down
16 changes: 8 additions & 8 deletions cmd/buildkit-nix/frontend.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"bytes"
"context"
"fmt"
"os"
Expand All @@ -10,7 +9,8 @@ import (
"github.com/docker/distribution/reference"
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/exporter/containerimage/exptypes"
"github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb"
"github.com/moby/buildkit/frontend/dockerfile/parser"
"github.com/moby/buildkit/frontend/dockerui"
"github.com/moby/buildkit/frontend/gateway/client"
"github.com/moby/buildkit/frontend/gateway/grpcclient"
"github.com/moby/buildkit/util/appcontext"
Expand Down Expand Up @@ -46,15 +46,15 @@ func frontendAction(cmd *cobra.Command, args []string) error {

func frontendBuild(nixImage string) client.BuildFunc {
return func(ctx context.Context, c client.Client) (*client.Result, error) {
nixImageSt := llb.Image(nixImage, llb.WithMetaResolver(c), dockerfile2llb.WithInternalName("nix image"))
nixImageSt := llb.Image(nixImage, llb.WithMetaResolver(c), dockerui.WithInternalName("nix image"))

dfName := c.BuildOpts().Opts[keyFilename]
if dfName == "" {
return nil, fmt.Errorf("option %q was not specified?", keyFilename)
}
localDfSt := llb.Local(localNameDockerfile,
llb.SessionID(c.BuildOpts().SessionID),
dockerfile2llb.WithInternalName("local dockerfile"),
dockerui.WithInternalName("local dockerfile"),
)

// Inject the self binary into the ExecOp.
Expand All @@ -70,7 +70,7 @@ func frontendBuild(nixImage string) client.BuildFunc {

localCtxSt := llb.Local(localNameContext,
llb.SessionID(c.BuildOpts().SessionID),
dockerfile2llb.WithInternalName("local context"),
dockerui.WithInternalName("local context"),
)

runSt := nixImageSt.Run(
Expand Down Expand Up @@ -124,11 +124,11 @@ func getSelfImageSt(ctx context.Context, c client.Client, localDfSt llb.State, d
if err != nil {
return nil, "", err
}
selfImageRefStr, _, _, ok := dockerfile2llb.DetectSyntax(bytes.NewReader(dfBytes))
selfImageRefStr, _, _, ok := parser.DetectSyntax(dfBytes)
if !ok {
return nil, "", fmt.Errorf("failed to detect self image reference from %q", dfName)
}
if selfImageDgst, _, err := c.ResolveImageConfig(ctx, selfImageRefStr, llb.ResolveImageConfigOpt{}); err != nil {
if _, selfImageDgst, _, err := c.ResolveImageConfig(ctx, selfImageRefStr, llb.ResolveImageConfigOpt{}); err != nil {
return nil, "", err
} else if selfImageDgst != "" {
selfImageRef, err := reference.ParseNormalizedNamed(selfImageRefStr)
Expand All @@ -141,7 +141,7 @@ func getSelfImageSt(ctx context.Context, c client.Client, localDfSt llb.State, d
}
selfImageRefStr = selfImageRefWithDigest.String()
}
selfImageSt := llb.Image(selfImageRefStr, llb.WithMetaResolver(c), dockerfile2llb.WithInternalName("self image"))
selfImageSt := llb.Image(selfImageRefStr, llb.WithMetaResolver(c), dockerui.WithInternalName("self image"))
return &selfImageSt, selfImageRefStr, nil
}

Expand Down
81 changes: 44 additions & 37 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,53 +1,60 @@
module github.com/reproducible-containers/buildkit-nix

go 1.19
go 1.20

require (
github.com/containerd/containerd v1.6.8
github.com/cyphar/filepath-securejoin v0.2.2
github.com/docker/distribution v2.8.1+incompatible
github.com/moby/buildkit v0.10.4
github.com/containerd/containerd v1.7.6
github.com/cyphar/filepath-securejoin v0.2.4
github.com/docker/distribution v2.8.2+incompatible
github.com/moby/buildkit v0.12.2
github.com/opencontainers/go-digest v1.0.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.0.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
)

require (
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/Microsoft/hcsshim v0.9.4 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/containerd/cgroups v1.0.3 // indirect
github.com/containerd/continuity v0.2.3-0.20220330195504-d132b287edc8 // indirect
github.com/containerd/ttrpc v1.1.0 // indirect
github.com/containerd/typeurl v1.0.2 // indirect
github.com/docker/docker v20.10.7+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.11.0 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/continuity v0.4.2 // indirect
github.com/containerd/ttrpc v1.2.2 // indirect
github.com/containerd/typeurl/v2 v2.1.1 // indirect
github.com/docker/docker v24.0.0-rc.2.0.20230718135204-8e51b8b59cb8+incompatible // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/in-toto/in-toto-golang v0.5.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/sys/signal v0.6.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/sys/signal v0.7.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc3 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect
github.com/shibumi/go-pathspec v1.3.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274 // indirect
go.opencensus.io v0.23.0 // indirect
go.opentelemetry.io/otel v1.4.1 // indirect
go.opentelemetry.io/otel/trace v1.4.1 // indirect
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e // indirect
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/grpc v1.45.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/metric v0.37.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
golang.org/x/crypto v0.2.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
)

// from https://github.com/moby/buildkit/blob/v0.10.4/go.mod#L124
replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible
Loading

0 comments on commit 3961d2b

Please sign in to comment.