From 4684a045a4cbfa67127743f963ef6c53554e0825 Mon Sep 17 00:00:00 2001 From: Olivier Lemasle Date: Jan 29 2021 22:49:19 +0000 Subject: Unbootstrap --- diff --git a/Compat-with-docker-1.19.patch b/Compat-with-docker-1.19.patch deleted file mode 100644 index 04c327b..0000000 --- a/Compat-with-docker-1.19.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- buildkit-0.8.1/executor/oci/spec_unix.go.orig 2021-01-28 23:36:51.935785593 +0100 -+++ buildkit-0.8.1/executor/oci/spec_unix.go 2021-01-28 23:38:09.405625361 +0100 -@@ -3,12 +3,9 @@ - package oci - - import ( -- "context" -- -- "github.com/containerd/containerd/containers" -+ "github.com/containerd/containerd/contrib/seccomp" - "github.com/containerd/containerd/oci" - "github.com/docker/docker/pkg/idtools" -- "github.com/docker/docker/profiles/seccomp" - "github.com/moby/buildkit/solver/pb" - "github.com/moby/buildkit/util/entitlements/security" - "github.com/moby/buildkit/util/system" -@@ -34,7 +31,7 @@ - oci.WithWriteableSysfs, - }, nil - } else if system.SeccompSupported() && mode == pb.SecurityMode_SANDBOX { -- return []oci.SpecOpts{withDefaultProfile()}, nil -+ return []oci.SpecOpts{seccomp.WithDefaultProfile()}, nil - } - return nil, nil - } -@@ -59,13 +56,3 @@ - oci.WithUserNamespace(specMapping(idmap.UIDs()), specMapping(idmap.GIDs())), - }, nil - } -- --// withDefaultProfile sets the default seccomp profile to the spec. --// Note: must follow the setting of process capabilities --func withDefaultProfile() oci.SpecOpts { -- return func(_ context.Context, _ oci.Client, _ *containers.Container, s *specs.Spec) error { -- var err error -- s.Linux.Seccomp, err = seccomp.GetDefaultProfile(s) -- return err -- } --} ---- buildkit-0.8.1/cmd/buildkitd/util_linux.go.orig 2021-01-29 00:06:26.815164641 +0100 -+++ buildkit-0.8.1/cmd/buildkitd/util_linux.go 2021-01-29 00:08:48.522042388 +0100 -@@ -13,16 +13,20 @@ - return nil, nil - } - -- idparts := strings.SplitN(str, ":", 3) -+ idparts := strings.Split(str, ":") - if len(idparts) > 2 { - return nil, errors.Errorf("invalid userns remap specification in %q", str) - } - - username := idparts[0] -+ groupname := username -+ if len(idparts) == 2 { -+ groupname = idparts[1] -+ } - -- logrus.Debugf("user namespaces: ID ranges will be mapped to subuid ranges of: %s", username) -+ logrus.Debugf("user namespaces: ID ranges will be mapped to subuid/subgid ranges of: %s:%s", username, groupname) - -- mappings, err := idtools.NewIdentityMapping(username) -+ mappings, err := idtools.NewIdentityMapping(username, groupname) - if err != nil { - return nil, errors.Wrap(err, "failed to create ID mappings") - } - diff --git a/golang-github-moby-buildkit.spec b/golang-github-moby-buildkit.spec index 14fc806..688ad48 100644 --- a/golang-github-moby-buildkit.spec +++ b/golang-github-moby-buildkit.spec @@ -1,6 +1,6 @@ # Generated by go2rpm %bcond_without check -%bcond_without bootstrap +%bcond_with bootstrap # https://github.com/moby/buildkit %global goipath github.com/moby/buildkit @@ -23,7 +23,7 @@ efficient, expressive and repeatable manner.} %global godocs docs examples AUTHORS README.md docs Name: %{goname} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit # Upstream license specification: Apache-2.0 @@ -31,7 +31,6 @@ License: ASL 2.0 URL: %{gourl} Source0: %{gosource} Patch0: Update-containerd-stargz-snapshotter.patch -Patch1: Compat-with-docker-1.19.patch BuildRequires: golang(github.com/AkihiroSuda/containerd-fuse-overlayfs) BuildRequires: golang(github.com/BurntSushi/toml) @@ -188,7 +187,6 @@ BuildRequires: git-core %prep %goprep %patch0 -%patch1 -p1 sed -i "s|github.com/hashicorp/go-immutable-radix|github.com/tonistiigi/go-immutable-radix|" $(find . -iname "*.go" -type f) sed -i "s|github.com/jaguilar/vt100|github.com/tonistiigi/vt100|" $(find . -iname "*.go" -type f) sed -i "s|gotest.tools|gotest.tools/v3|" $(find . -iname "*.go" -type f) @@ -243,6 +241,9 @@ install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %gopkgfiles %changelog +* Fri Jan 29 2021 Olivier Lemasle - 0.8.1-2 +- Unbootstrap + * Fri Jan 29 2021 Olivier Lemasle - 0.8.1-1 - Update to 0.8.1 - bootstrap