From b6d622e5aaa491f883d3af1b5bbb5d8a871b8730 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 22:49:52 +0000 Subject: [PATCH 1/6] build(deps): bump github.com/opencontainers/image-spec Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec) from 1.1.0-rc5 to 1.1.0. - [Release notes](https://github.com/opencontainers/image-spec/releases) - [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md) - [Commits](https://github.com/opencontainers/image-spec/compare/v1.1.0-rc5...v1.1.0) --- updated-dependencies: - dependency-name: github.com/opencontainers/image-spec dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 473a48ee71..29c605c91d 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e github.com/onsi/gomega v1.31.1 github.com/opencontainers/go-digest v1.0.0 - github.com/opencontainers/image-spec v1.1.0-rc5 + github.com/opencontainers/image-spec v1.1.0 github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8 diff --git a/go.sum b/go.sum index 73197a0ac1..891af07ac0 100644 --- a/go.sum +++ b/go.sum @@ -299,8 +299,8 @@ github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= From 85e968209124e339515f0616da0c014233db9b3b Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Mon, 26 Feb 2024 13:06:10 -0600 Subject: [PATCH 2/6] Add a test for non-meta buildpack with empty stacks Signed-off-by: Josh W Lewis --- pkg/buildpack/builder_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkg/buildpack/builder_test.go b/pkg/buildpack/builder_test.go index 5138fcad81..3abdeecb24 100644 --- a/pkg/buildpack/builder_test.go +++ b/pkg/buildpack/builder_test.go @@ -244,6 +244,25 @@ func testPackageBuilder(t *testing.T, when spec.G, it spec.S) { }) when("validate stacks", func() { + when("buildpack does not define stacks", func() { + it("should succeed", func() { + bp, err := ifakes.NewFakeBuildpack(dist.BuildpackDescriptor{ + WithAPI: api.MustParse("0.10"), + WithInfo: dist.ModuleInfo{ + ID: "bp.1.id", + Version: "bp.1.version", + }, + WithStacks: nil, + WithOrder: nil, + }, 0644) + h.AssertNil(t, err) + builder := buildpack.NewBuilder(mockImageFactory(expectedImageOS)) + builder.SetBuildpack(bp) + err = testFn(builder) + h.AssertNil(t, err) + }) + }) + when("buildpack is meta-buildpack", func() { it("should succeed", func() { bp, err := ifakes.NewFakeBuildpack(dist.BuildpackDescriptor{ From 03cfdef3d0ef50fad91dfc2c46248a61d15253bf Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Mon, 26 Feb 2024 13:24:26 -0600 Subject: [PATCH 3/6] Assume non-meta buildpacks without stacks use any stack Signed-off-by: Josh W Lewis --- pkg/buildpack/builder.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkg/buildpack/builder.go b/pkg/buildpack/builder.go index 443f0de322..b76dccc74f 100644 --- a/pkg/buildpack/builder.go +++ b/pkg/buildpack/builder.go @@ -330,13 +330,22 @@ func (b *PackageBuilder) validate() error { func (b *PackageBuilder) resolvedStacks() []dist.Stack { stacks := b.buildpack.Descriptor().Stacks() + if len(stacks) == 0 && len(b.buildpack.Descriptor().Order()) == 0 { + // For non-meta-buildpacks using targets, not stacks: assume any stack + stacks = append(stacks, dist.Stack{ID: "*"}) + } for _, bp := range b.AllModules() { bpd := bp.Descriptor() + bpdStacks := bp.Descriptor().Stacks() + if len(bpdStacks) == 0 && len(bpd.Order()) == 0 { + // For non-meta-buildpacks using targets, not stacks: assume any stack + bpdStacks = append(stacks, dist.Stack{ID: "*"}) + } if len(stacks) == 0 { - stacks = bpd.Stacks() - } else if len(bpd.Stacks()) > 0 { // skip over "meta-buildpacks" - stacks = stack.MergeCompatible(stacks, bpd.Stacks()) + stacks = bpdStacks + } else if len(bpdStacks) > 0 { // skip over "meta-buildpacks" + stacks = stack.MergeCompatible(stacks, bpdStacks) } } From 7a5d93b2c76e8ed4fd9f632bc3cfb9855a087f73 Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Mon, 26 Feb 2024 14:18:19 -0600 Subject: [PATCH 4/6] Fix incorrect append argument Signed-off-by: Josh W Lewis --- pkg/buildpack/builder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/buildpack/builder.go b/pkg/buildpack/builder.go index b76dccc74f..14006b6b67 100644 --- a/pkg/buildpack/builder.go +++ b/pkg/buildpack/builder.go @@ -339,7 +339,7 @@ func (b *PackageBuilder) resolvedStacks() []dist.Stack { bpdStacks := bp.Descriptor().Stacks() if len(bpdStacks) == 0 && len(bpd.Order()) == 0 { // For non-meta-buildpacks using targets, not stacks: assume any stack - bpdStacks = append(stacks, dist.Stack{ID: "*"}) + bpdStacks = append(bpdStacks, dist.Stack{ID: "*"}) } if len(stacks) == 0 { From 35fd5f5e2d045cf52cfe0b206ea9e72dac13f3ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 22:18:04 +0000 Subject: [PATCH 5/6] build(deps): bump the go-dependencies group with 2 updates Bumps the go-dependencies group with 2 updates: [github.com/gdamore/tcell/v2](https://github.com/gdamore/tcell) and [golang.org/x/crypto](https://github.com/golang/crypto). Updates `github.com/gdamore/tcell/v2` from 2.7.0 to 2.7.1 - [Release notes](https://github.com/gdamore/tcell/releases) - [Changelog](https://github.com/gdamore/tcell/blob/main/CHANGESv2.md) - [Commits](https://github.com/gdamore/tcell/compare/v2.7.0...v2.7.1) Updates `golang.org/x/crypto` from 0.19.0 to 0.20.0 - [Commits](https://github.com/golang/crypto/compare/v0.19.0...v0.20.0) --- updated-dependencies: - dependency-name: github.com/gdamore/tcell/v2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-dependencies - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-dependencies ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 29c605c91d..d49b43c8ae 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/docker/docker v25.0.3+incompatible github.com/docker/go-connections v0.5.0 github.com/dustin/go-humanize v1.0.1 - github.com/gdamore/tcell/v2 v2.7.0 + github.com/gdamore/tcell/v2 v2.7.1 github.com/go-git/go-git/v5 v5.11.0 github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.6.0 @@ -29,7 +29,7 @@ require ( github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 github.com/sclevine/spec v1.4.0 github.com/spf13/cobra v1.8.0 - golang.org/x/crypto v0.19.0 + golang.org/x/crypto v0.20.0 golang.org/x/mod v0.15.0 golang.org/x/oauth2 v0.17.0 golang.org/x/sync v0.6.0 diff --git a/go.sum b/go.sum index 891af07ac0..cc0f3d566b 100644 --- a/go.sum +++ b/go.sum @@ -154,8 +154,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= github.com/gdamore/tcell/v2 v2.4.1-0.20210905002822-f057f0a857a1/go.mod h1:Az6Jt+M5idSED2YPGtwnfJV0kXohgdCBPmHGSYc1r04= -github.com/gdamore/tcell/v2 v2.7.0 h1:I5LiGTQuwrysAt1KS9wg1yFfOI3arI3ucFrxtd/xqaA= -github.com/gdamore/tcell/v2 v2.7.0/go.mod h1:hl/KtAANGBecfIPxk+FzKvThTqI84oplgbPEmVX60b8= +github.com/gdamore/tcell/v2 v2.7.1 h1:TiCcmpWHiAU7F0rA2I3S2Y4mmLmO9KHxJ7E1QhYzQbc= +github.com/gdamore/tcell/v2 v2.7.1/go.mod h1:dSXtXTSK0VsW1biw65DZLZ2NKr7j0qP/0J7ONmsraWg= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= @@ -417,8 +417,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= +golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -483,7 +483,6 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -493,7 +492,6 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From d579a39358e6c2487ecc6f21c39110fa89b7a3cf Mon Sep 17 00:00:00 2001 From: valen-mascarenhas14 Date: Fri, 1 Mar 2024 18:15:36 +0530 Subject: [PATCH 6/6] Add pack cli support for IBM ppc64le Signed-off-by: valen-mascarenhas14 --- .github/workflows/build.yml | 14 ++++++++++++++ .github/workflows/delivery-docker.yml | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 78d4c90755..831051c9c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -176,6 +176,9 @@ jobs: - name: linux-s390x goarch: s390x goos: linux + - name: linux-ppc64le + goarch: ppc64le + goos: linux needs: test runs-on: ubuntu-latest steps: @@ -239,6 +242,12 @@ jobs: filename=pack-v${{ env.PACK_VERSION }}-linux-s390x.tgz tar -C pack-linux-s390x -vzcf $filename pack shasum -a 256 $filename > $filename.sha256 + - name: Package artifacts - linux-ppc64le + run: | + chmod +x pack-linux-ppc64le/pack + filename=pack-v${{ env.PACK_VERSION }}-linux-ppc64le.tgz + tar -C pack-linux-ppc64le -vzcf $filename pack + shasum -a 256 $filename > $filename.sha256 - name: Package artifacts - macos-arm64 run: | chmod +x pack-macos-arm64/pack @@ -314,6 +323,11 @@ jobs: ```bash (curl -sSL "https://github.com/buildpacks/pack/releases/download/v${{ env.PACK_VERSION }}/pack-v${{ env.PACK_VERSION }}-linux-s390x.tgz" | sudo tar -C /usr/local/bin/ --no-same-owner -xzv pack) ``` + ##### PPC64LE + + ```bash + (curl -sSL "https://github.com/buildpacks/pack/releases/download/v${{ env.PACK_VERSION }}/pack-v${{ env.PACK_VERSION }}-linux-ppc64le.tgz" | sudo tar -C /usr/local/bin/ --no-same-owner -xzv pack) + ``` #### MacOS diff --git a/.github/workflows/delivery-docker.yml b/.github/workflows/delivery-docker.yml index a44e2cad8a..eceb0feae6 100644 --- a/.github/workflows/delivery-docker.yml +++ b/.github/workflows/delivery-docker.yml @@ -65,7 +65,7 @@ jobs: run: | docker buildx build . \ --tag ${{ env.IMG_NAME }}:${{ steps.version.outputs.result }}${{ matrix.suffix }} \ - --platform linux/amd64,linux/arm64,linux/s390x \ + --platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le \ --build-arg pack_version=${{ steps.version.outputs.result }} \ --build-arg base_image=${{ matrix.base_image }} \ --provenance=false \