Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ $BP_LOG_LEVEL="DEBUG"

## Compatibility

This buildpack is currently only supported on the Paketo Bionic and Jammy stack
This buildpack is currently only supported on the Paketo Jammy stack
distributions. Pre-compiled distributions of Ruby are provided for the Paketo stacks (i.e.
`io.buildpacks.stack.jammy` and `io.buildpacks.stacks.bionic`).

Jammy stack support only applies to Ruby version 3.1 and above at this time.
`io.buildpacks.stack.jammy`).

## Development

Expand Down
116 changes: 1 addition & 115 deletions buildpack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,74 +16,7 @@ api = "0.7"
include-files = ["bin/run", "bin/build", "bin/detect", "buildpack.toml"]
pre-package = "./scripts/build.sh"
[metadata.default-versions]
ruby = "3.1.*"

[[metadata.dependencies]]
checksum = "sha256:2b41783bf4e4ccaed44498c05615f61455d556380b4fca641eba135832a2b063"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.6:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=0d0dafb859e76763432571a3109d1537d976266be3083445651dc68deed25c22&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.gz"
source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.gz"
source-checksum = "sha256:0d0dafb859e76763432571a3109d1537d976266be3083445651dc68deed25c22"
stacks = ["io.buildpacks.stacks.jammy"]
uri = "https://artifacts.paketo.io/ruby/ruby_3.1.6_linux_x64_jammy_2b41783b.tgz"
version = "3.1.6"

[[metadata.dependencies]]
checksum = "sha256:6d1e6b48e5de98f5fdcad5c06efc9a8f30c28bfe8e310918781f10ed531a4fe2"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.6:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=0d0dafb859e76763432571a3109d1537d976266be3083445651dc68deed25c22&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.gz"
source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.gz"
source-checksum = "sha256:0d0dafb859e76763432571a3109d1537d976266be3083445651dc68deed25c22"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://artifacts.paketo.io/ruby/ruby_3.1.6_linux_x64_bionic_6d1e6b48.tgz"
version = "3.1.6"

[[metadata.dependencies]]
checksum = "sha256:560c7f9b0cddd6dad08c88cf1a69351ce3c3e37d5e7fc49b2005480b0591d3a3"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.7:*:*:*:*:*:*:*"
deprecation_date = "2025-03-26T00:00:00Z"
id = "ruby"
licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=0556acd69f141ddace03fa5dd8d76e7ea0d8f5232edf012429579bcdaab30e7b&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.7.tar.gz"
source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.7.tar.gz"
source-checksum = "sha256:0556acd69f141ddace03fa5dd8d76e7ea0d8f5232edf012429579bcdaab30e7b"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://artifacts.paketo.io/ruby/ruby_3.1.7_linux_x64_bionic_560c7f9b.tgz"
version = "3.1.7"

[[metadata.dependencies]]
checksum = "sha256:5509eede794beecf08debbec26fc115005e6bc67ad523d07fae287d12fa7416e"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.1.7:*:*:*:*:*:*:*"
deprecation_date = "2025-03-26T00:00:00Z"
id = "ruby"
licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=0556acd69f141ddace03fa5dd8d76e7ea0d8f5232edf012429579bcdaab30e7b&download_url=https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.7.tar.gz"
source = "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.7.tar.gz"
source-checksum = "sha256:0556acd69f141ddace03fa5dd8d76e7ea0d8f5232edf012429579bcdaab30e7b"
stacks = ["io.buildpacks.stacks.jammy"]
uri = "https://artifacts.paketo.io/ruby/ruby_3.1.7_linux_x64_jammy_5509eede.tgz"
version = "3.1.7"

[[metadata.dependencies]]
checksum = "sha256:5687f94f483f59a8ab47cf73c733202a1c31183d58096f6adb2570e8b3bbe2a8"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.2.8:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=77acdd8cfbbe1f8e573b5e6536e03c5103df989dc05fa68c70f011833c356075&download_url=https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.8.tar.gz"
source = "https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.8.tar.gz"
source-checksum = "sha256:77acdd8cfbbe1f8e573b5e6536e03c5103df989dc05fa68c70f011833c356075"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://artifacts.paketo.io/ruby/ruby_3.2.8_linux_x64_bionic_5687f94f.tgz"
version = "3.2.8"
ruby = "3.4.*"

[[metadata.dependencies]]
checksum = "sha256:08fb3d66a578deb7c3cf428bb8d9e3f006adbb264b8c40f9693b2fec4c32c0a1"
Expand All @@ -98,19 +31,6 @@ api = "0.7"
uri = "https://artifacts.paketo.io/ruby/ruby_3.2.8_linux_x64_jammy_08fb3d66.tgz"
version = "3.2.8"

[[metadata.dependencies]]
checksum = "sha256:5908cabd9e43e19ed784adb9655c665a6157bb90e51a0304442f339daab52afc"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.2.9:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=abbad98db9aeb152773b0d35868e50003b8c467f3d06152577c4dfed9d88ed2a&download_url=https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.9.tar.gz"
source = "https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.9.tar.gz"
source-checksum = "sha256:abbad98db9aeb152773b0d35868e50003b8c467f3d06152577c4dfed9d88ed2a"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://artifacts.paketo.io/ruby/ruby_3.2.9_linux_x64_bionic_5908cabd.tgz"
version = "3.2.9"

[[metadata.dependencies]]
checksum = "sha256:d5684554cdf64b8348ddc06adde8e45d4783419383eae0f5e700a010a0567efb"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.2.9:*:*:*:*:*:*:*"
Expand All @@ -124,19 +44,6 @@ api = "0.7"
uri = "https://artifacts.paketo.io/ruby/ruby_3.2.9_linux_x64_jammy_d5684554.tgz"
version = "3.2.9"

[[metadata.dependencies]]
checksum = "sha256:70c9a062068d1a8329e796da756c7826a40c8f54d96edd20d8d6a2294397fb90"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.3.9:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=d1991690a4e17233ec6b3c7844c1e1245c0adce3e00d713551d0458467b727b1&download_url=https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.9.tar.gz"
source = "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.9.tar.gz"
source-checksum = "sha256:d1991690a4e17233ec6b3c7844c1e1245c0adce3e00d713551d0458467b727b1"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://artifacts.paketo.io/ruby/ruby_3.3.9_linux_x64_bionic_70c9a062.tgz"
version = "3.3.9"

[[metadata.dependencies]]
checksum = "sha256:83b4192551fd2918491c0342e44b48dfae0c9f301a3fa1def6653d419a1a6758"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.3.9:*:*:*:*:*:*:*"
Expand All @@ -150,19 +57,6 @@ api = "0.7"
uri = "https://artifacts.paketo.io/ruby/ruby_3.3.9_linux_x64_jammy_83b41925.tgz"
version = "3.3.9"

[[metadata.dependencies]]
checksum = "sha256:9d4376f8ee14eb8074abd200f39e5634dc82876803fdaee122f9308639477802"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.3.10:*:*:*:*:*:*:*"
id = "ruby"
licenses = ["0BSD", "AGPL-1.0-only", "AGPL-1.0-or-later", "BSD-1-Clause", "BSD-2-Clause", "BSD-2-Clause-Views", "BSD-3-Clause", "BSD-3-Clause-Clear", "BSD-3-Clause-No-Military-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-4-Clause-UC", "Bison-exception-2.2", "FSFUL", "GPL-2.0-only", "GPL-2.0-or-later", "JSON", "MIT", "MIT-0", "MIT-advertising", "MIT-feh", "Ruby", "X11-distribute-modifications-variant", "Zlib", "deprecated_AGPL-1.0", "deprecated_GPL-2.0", "deprecated_GPL-2.0+", "deprecated_GPL-2.0-with-bison-exception"]
name = "Ruby"
purl = "pkg:generic/[email protected]?checksum=b555baa467a306cfc8e6c6ed24d0d27b27e9a1bed1d91d95509859eac6b0e928&download_url=https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.10.tar.gz"
source = "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.10.tar.gz"
source-checksum = "sha256:b555baa467a306cfc8e6c6ed24d0d27b27e9a1bed1d91d95509859eac6b0e928"
stacks = ["io.buildpacks.stacks.bionic"]
uri = "https://artifacts.paketo.io/ruby/ruby_3.3.10_linux_x64_bionic_9d4376f8.tgz"
version = "3.3.10"

[[metadata.dependencies]]
checksum = "sha256:4b242e4caadbf9d118e51059c02783358ccfbd5680a013cd16bf10910946b370"
cpe = "cpe:2.3:a:ruby-lang:ruby:3.3.10:*:*:*:*:*:*:*"
Expand Down Expand Up @@ -228,11 +122,6 @@ api = "0.7"
uri = "https://artifacts.paketo.io/ruby/ruby_3.4.7_linux_x64_jammy_94e17b04.tgz"
version = "3.4.7"

[[metadata.dependency-constraints]]
constraint = "3.1.*"
id = "ruby"
patches = 2

[[metadata.dependency-constraints]]
constraint = "3.2.*"
id = "ruby"
Expand All @@ -248,8 +137,5 @@ api = "0.7"
id = "ruby"
patches = 2

[[stacks]]
id = "io.buildpacks.stacks.bionic"

[[stacks]]
id = "io.buildpacks.stacks.jammy"
16 changes: 3 additions & 13 deletions dependency/actions/compile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ To compile ruby, follow the below steps.

### Build the dockerfile:
```
docker build --tag bionic-compile --file <target>.Dockerfile .
```

#### For Bionic:
```
docker build --tag bionic-compile --file bionic.Dockerfile .
docker build --tag <target>-compile --file <target>.Dockerfile .
```

#### For Jammy:
Expand All @@ -22,13 +17,8 @@ docker build --tag jammy-compile --file jammy.Dockerfile .
docker run --volume $PWD:/tmp/compilation <target>-compile --outputDir /tmp/compilation --target <target> --version <version>
```

#### For Bionic:
```
docker run --volume $PWD:/tmp/compilation bionic-compile --outputDir /tmp/compilation --target bionic --version <version>
```

#### For Jammy:
**Note** that only Ruby 3.1.0 and above are supported on Jammy

```
docker run --volume $PWD:/tmp/compilation jammy-compile --outputDir /tmp/compilation --target bionic --version <version>
docker run --volume $PWD:/tmp/compilation jammy-compile --outputDir /tmp/compilation --target jammy --version <version>
```
17 changes: 0 additions & 17 deletions dependency/actions/compile/bionic.Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions dependency/actions/compile/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,8 @@ function main() {
exit 1
fi

# Only Ruby versions >= 3.1.0 work on Jammy
major=$(echo "${version%.*}" | cut -d '.' -f1)
minor=$(echo "${version%.*}" | cut -d '.' -f2)
if [[ "${target}" == "jammy" ]] && [[ ${major} -lt 3 || (${major} -eq 3 && ${minor} -lt 1) ]]; then
echo "version ${version} cannot be compiled on jammy, only 3.1.0 and above"
exit 1
fi

if [[ "${major}" -ge 3 ]] && [[ "${minor}" -ge 2 ]]; then
configure_opts+=("--enable-yjit")
fi
Expand Down
19 changes: 0 additions & 19 deletions dependency/retrieval/components/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"strings"
"time"

"github.com/Masterminds/semver"
"github.com/paketo-buildpacks/packit/v2/cargo"
)

Expand All @@ -27,9 +26,6 @@ type DeprecationDate interface {
}

// GenerateMetadata will generate Ruby dependency-specific metadata for each given target
// Note that `jammy` stack-related entries will only be generated when the
// version is 3.1 or greater, due to OpenSSL v3 incompatibilites with Ruby 3.0
// and below.
func GenerateMetadata(release RubyRelease, targets []string, licenseRetriever License, deprecationDate DeprecationDate) ([]Dependency, error) {
dependencies := []Dependency{}
licenses, err := licenseRetriever.LookupLicenses("ruby", release.URL.Gz)
Expand All @@ -56,22 +52,7 @@ func GenerateMetadata(release RubyRelease, targets []string, licenseRetriever Li

stacks := []string{}
switch target {
case "bionic":
stacks = []string{"io.buildpacks.stacks.bionic"}
case "jammy":
// If target==jammy and version <= 3.0.x, don't include it
version, err := semver.NewVersion(release.Version)
if err != nil {
return dependencies, err
}
constraint, err := semver.NewConstraint("< 3.1")
if err != nil {
//untested
return dependencies, err
}
if constraint.Check(version) {
continue
}
stacks = []string{"io.buildpacks.stacks.jammy"}
}

Expand Down
Loading
Loading