-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ruby 3.4: interpreter & standard gems
- Loading branch information
1 parent
28cb150
commit b4488d4
Showing
42 changed files
with
2,111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
package: | ||
name: ruby-3.4-bootstrap | ||
version: 3.4.0 | ||
epoch: 0 | ||
description: "the Ruby programming language" | ||
copyright: | ||
- license: Ruby | ||
- license: BSD-2-Clause | ||
options: | ||
no-provides: true | ||
no-depends: true # sca adds ruby binaries | ||
dependencies: | ||
runtime: | ||
- glibc | ||
- gmp | ||
- libgcc | ||
- openssl | ||
- yaml | ||
- zlib | ||
provides: | ||
- ruby-3.4 | ||
- cmd:ruby # If we need to use gems built during bootstrap to build bootstrap'd gems we need to resolve the ruby dependcy | ||
- ruby3.4-psych | ||
- ruby3.4-rake | ||
provider-priority: 0 | ||
|
||
environment: | ||
contents: | ||
packages: | ||
- autoconf | ||
- bison | ||
- build-base | ||
- busybox | ||
- bzip2-dev | ||
- ca-certificates-bundle | ||
- expat-dev | ||
- gdbm-dev | ||
- glibc-dev | ||
- gmp-dev | ||
- graphviz | ||
- libffi-dev | ||
- libxcrypt-dev | ||
- linux-headers | ||
- mpdecimal-dev | ||
- ncurses-dev | ||
- oniguruma-dev | ||
- openssf-compiler-options | ||
- openssl-dev | ||
- pkgconf | ||
- readline-dev | ||
- ruby-3.3 | ||
- rust | ||
- yaml-dev | ||
- zlib-dev | ||
|
||
vars: | ||
prefix: /usr | ||
|
||
var-transforms: | ||
- from: ${{package.version}} | ||
match: \. | ||
replace: _ | ||
to: underscore-package-version | ||
|
||
pipeline: | ||
- uses: git-checkout | ||
with: | ||
repository: https://github.com/ruby/ruby | ||
tag: v${{vars.underscore-package-version}}_preview2 | ||
expected-commit: 32c733f57bb91e22972319ee63eac9521d954ebc | ||
|
||
- name: Generate and Configure | ||
runs: | | ||
./autogen.sh | ||
./configure \ | ||
--host=${{host.triplet.gnu}} \ | ||
--build=${{host.triplet.gnu}} \ | ||
--target=${{host.triplet.gnu}} \ | ||
--prefix=${{vars.prefix}} \ | ||
--enable-shared \ | ||
--disable-rpath \ | ||
--sysconfdir=/etc \ | ||
--enable-mkmf-verbose \ | ||
--enable-yjit | ||
- uses: autoconf/make | ||
|
||
# Update and Extract bundled gems | ||
- uses: autoconf/make | ||
with: | ||
opts: update-gems extract-gems | ||
|
||
# Build documentation | ||
- uses: autoconf/make | ||
with: | ||
opts: rdoc capi | ||
|
||
# Install all the bits | ||
- uses: autoconf/make-install | ||
|
||
- runs: | | ||
# Ignore the patch version of ruby since ruby will install under the | ||
# version of the latest standard library. Should produce the string 3.3.* | ||
RUBYWILD="$(echo ${{package.version}} | cut -d. -f-2).*" | ||
RUBYDIR=${{targets.destdir}}${{vars.prefix}}/lib/ruby/$RUBYWILD | ||
rm -rf ${RUBYDIR}/bundler | ||
rm -f ${RUBYDIR}/bundler.rb | ||
GEMDIR=${{targets.destdir}}${{vars.prefix}}/lib/ruby/gems/$RUBYWILD | ||
rm -rf ${GEMDIR}/gems/bundler-* | ||
rm -f ${GEMDIR}/specifications/default/bundler-*.gemspec | ||
rm -f ${{targets.destdir}}/usr/bin/bundle \ | ||
${{targets.destdir}}/usr/bin/bundler | ||
- runs: | | ||
find ${{targets.destdir}} -name 'mkmf.log' -exec rm {} \; | ||
subpackages: | ||
- name: "ruby-3.4-bootstrap-dev" | ||
description: "ruby development headers" | ||
options: | ||
no-depends: true | ||
no-provides: true | ||
pipeline: | ||
- uses: split/dev | ||
test: | ||
pipeline: | ||
- uses: test/pkgconf | ||
|
||
update: | ||
enabled: true | ||
version-transform: | ||
- match: "_" | ||
replace: . | ||
github: | ||
identifier: ruby/ruby | ||
strip-prefix: v | ||
use-tag: true | ||
tag-filter-prefix: v3_4_ | ||
|
||
test: | ||
pipeline: | ||
- name: Test binaries | ||
runs: | | ||
ruby --version | grep ${{package.version}} | ||
cat <<EOF >> /tmp/hello.rb | ||
puts("Hello Wolfi!") | ||
EOF | ||
ruby /tmp/hello.rb | ||
erb --version | ||
gem --version | ||
gem --help | ||
irb --version | ||
irb --help | ||
racc --version | ||
rake --version | ||
rake --help | ||
rdbg --version | ||
rdbg --help | ||
rdoc --version | ||
rdoc --help | ||
ri --version | ||
ri --help | ||
ruby --help | ||
- name: Test Modules | ||
runs: | | ||
ruby -e "require 'debug'" | ||
ruby -e "require 'racc'" | ||
ruby -e "require 'rake'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
package: | ||
name: ruby-3.4 | ||
version: 3.4.0 | ||
epoch: 0 | ||
description: "the Ruby programming language" | ||
copyright: | ||
- license: Ruby | ||
- license: BSD-2-Clause | ||
dependencies: | ||
provides: | ||
- ruby=${{package.full-version}} | ||
runtime: | ||
- glibc | ||
- gmp | ||
- libgcc | ||
- openssl | ||
- yaml | ||
- zlib | ||
|
||
environment: | ||
contents: | ||
packages: | ||
- autoconf | ||
- build-base | ||
- busybox | ||
- coreutils | ||
- gdbm-dev | ||
- glibc-dev | ||
- gmp-dev | ||
- graphviz | ||
- libffi-dev | ||
- libxcrypt-dev | ||
- linux-headers | ||
- openssf-compiler-options | ||
- openssl-dev | ||
- pkgconf | ||
- readline-dev | ||
- ruby-3.4-bootstrap | ||
- rust | ||
- tk-dev | ||
- yaml-dev | ||
- zlib-dev | ||
|
||
vars: | ||
prefix: /usr | ||
|
||
var-transforms: | ||
- from: ${{package.version}} | ||
match: \. | ||
replace: _ | ||
to: underscore-package-version | ||
|
||
pipeline: | ||
- uses: git-checkout | ||
with: | ||
repository: https://github.com/ruby/ruby | ||
tag: v${{vars.underscore-package-version}}_preview2 | ||
expected-commit: 32c733f57bb91e22972319ee63eac9521d954ebc | ||
|
||
- name: Generate and Configure | ||
runs: | | ||
./autogen.sh | ||
./configure \ | ||
--prefix=${{vars.prefix}} \ | ||
--sysconfdir=/etc \ | ||
--enable-shared \ | ||
--disable-rpath \ | ||
--enable-pthread \ | ||
--enable-mkmf-verbose \ | ||
--enable-yjit | ||
- uses: autoconf/make | ||
|
||
- uses: autoconf/make-install | ||
|
||
- uses: strip | ||
|
||
- runs: | | ||
set -x | ||
RUBYWILD="$(echo ${{package.version}} | cut -d. -f-2).*" | ||
RUBYDIR=${{targets.destdir}}${{vars.prefix}}/lib/ruby/$RUBYWILD rm -rf ${RUBYDIR}/bundler rm ${RUBYDIR}/bundler.rb | ||
GEMDIR=${{targets.destdir}}${{vars.prefix}}/lib/ruby/gems/$RUBYWILD rm -rf ${GEMDIR}/gems/bundler-* rm ${GEMDIR}/specifications/default/bundler-*.gemspec | ||
rm -rf ${{targets.destdir}}/usr/bin/bundle \ ${{targets.destdir}}/usr/bin/bundler | ||
rm -rf ${{targets.destdir}}/usr/lib/ruby/${{package.version}}*/bundler* | ||
- runs: | | ||
set -x | ||
rm -rf --verbose ${{targets.destdir}}/usr/lib/ruby/gems/${{package.version}}*/cache | ||
while read -r gem ; do | ||
echo $gem | ||
rm -rf --verbose ${{targets.destdir}}/usr/lib/ruby/gems/${{package.version}}*/gems/${gem}* | ||
rm -rf --verbose ${{targets.destdir}}/usr/lib/ruby/specifications/${gem}-*.gemspec | ||
rm -rf --verbose ${{targets.destdir}}/usr/lib/ruby/gems/${{package.version}}*/specifications/${gem}*.gemspec | ||
rm -rf --verbose ${{targets.destdir}}/usr/lib/ruby/gems/${{package.version}}*/specifications/default/${gem}*.gemspec | ||
done < standard_gems | ||
while read -r bin ; do | ||
echo $bin | ||
rm -rf --verbose ${{targets.destdir}}/usr/bin/${bin} | ||
rm -rf --verbose ${{targets.destdir}}/usr/bin/${bin}.lock | ||
rm -rf --verbose ${{targets.destdir}}/usr/share/man/man1/${bin}.1 | ||
done < standard_gems_bins | ||
subpackages: | ||
- name: "ruby-3.4-doc" | ||
description: "ruby documentation" | ||
pipeline: | ||
- uses: split/manpages | ||
- runs: | | ||
mkdir -p "${{targets.subpkgdir}}"/usr/share | ||
mv "${{targets.destdir}}"/usr/share/doc "${{targets.subpkgdir}}"/usr/share/ | ||
mv "${{targets.destdir}}"/usr/share/ri "${{targets.subpkgdir}}"/usr/share/ | ||
- name: "ruby-3.4-dev" | ||
description: "ruby development headers" | ||
pipeline: | ||
- uses: split/dev | ||
test: | ||
pipeline: | ||
- uses: test/pkgconf | ||
|
||
update: | ||
enabled: true | ||
version-transform: | ||
- match: "_" | ||
replace: . | ||
github: | ||
identifier: ruby/ruby | ||
strip-prefix: v | ||
use-tag: true | ||
tag-filter-prefix: v3_4_ | ||
|
||
test: | ||
pipeline: | ||
- runs: | | ||
ruby --version | grep ${{package.version}} | ||
cat <<EOF >> /tmp/hello.rb | ||
puts("Hello Wolfi!") | ||
EOF | ||
ruby /tmp/hello.rb | ||
ruby --help | ||
- name: Test bundled binaries are absent | ||
runs: | | ||
ls /usr/bin | grep 'racc|rake|rbi|erb|gem' || exit 0 && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
debug | ||
matrix | ||
minitest | ||
net-ftp | ||
net-imap | ||
net-pop | ||
net-smtp | ||
power_assert | ||
prime | ||
racc | ||
rake | ||
rbs | ||
rexml | ||
rss | ||
test-unit | ||
typeprof | ||
# default-gems | ||
csv | ||
erb | ||
irb | ||
rdoc | ||
base64 | ||
drb | ||
bigdecimal | ||
uri | ||
benchmark | ||
#misc | ||
bundler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
racc | ||
rake | ||
rbs | ||
rdbg | ||
typeprof | ||
bundle | ||
bundler | ||
erb | ||
gem | ||
irb | ||
rdoc | ||
ri | ||
bundler |
Oops, something went wrong.