Skip to content

Commit 6aee559

Browse files
ruby 3.4: interpreter & gem batch 1
1 parent bea68c7 commit 6aee559

File tree

83 files changed

+5759
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+5759
-0
lines changed

ruby-3.4.yaml

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
package:
2+
name: ruby-3.4
3+
version: 3.4.0
4+
epoch: 0
5+
description: "the Ruby programming language"
6+
copyright:
7+
- license: Ruby
8+
- license: BSD-2-Clause
9+
dependencies:
10+
provides:
11+
- ruby=${{package.full-version}}
12+
# These are bundled gems
13+
- ruby3.4-csv
14+
- ruby3.4-base64
15+
- ruby3.4-drb
16+
runtime:
17+
- glibc
18+
- gmp
19+
- libgcc
20+
- openssl
21+
- yaml
22+
- zlib
23+
24+
environment:
25+
contents:
26+
packages:
27+
- autoconf
28+
- build-base
29+
- busybox
30+
- coreutils
31+
- gdbm-dev
32+
- glibc-dev
33+
- gmp-dev
34+
- graphviz
35+
- libffi-dev
36+
- libxcrypt-dev
37+
- linux-headers
38+
- openssf-compiler-options
39+
- openssl-dev
40+
- pkgconf
41+
- readline-dev
42+
- ruby-3.3
43+
- rust
44+
- tk-dev
45+
- yaml-dev
46+
- zlib-dev
47+
48+
vars:
49+
prefix: /usr
50+
51+
var-transforms:
52+
- from: ${{package.version}}
53+
match: \.
54+
replace: _
55+
to: underscore-package-version
56+
57+
pipeline:
58+
- uses: git-checkout
59+
with:
60+
repository: https://github.com/ruby/ruby
61+
tag: v${{vars.underscore-package-version}}_preview2
62+
expected-commit: 32c733f57bb91e22972319ee63eac9521d954ebc
63+
64+
- name: Generate and Configure
65+
runs: |
66+
./autogen.sh
67+
./configure \
68+
--host=${{host.triplet.gnu}} \
69+
--build=${{host.triplet.gnu}} \
70+
--target=${{host.triplet.gnu}} \
71+
--prefix=${{vars.prefix}} \
72+
--enable-shared \
73+
--disable-rpath \
74+
--sysconfdir=/etc \
75+
--enable-mkmf-verbose \
76+
--enable-yjit
77+
78+
- uses: autoconf/make
79+
80+
# Update and Extract bundled gems
81+
- uses: autoconf/make
82+
with:
83+
opts: update-gems extract-gems
84+
85+
# Build documentation
86+
- uses: autoconf/make
87+
with:
88+
opts: rdoc capi
89+
90+
- uses: autoconf/make-install
91+
92+
- runs: |
93+
# Ignore the patch version of ruby since ruby will install under the
94+
# version of the latest standard library. Should produce the string 3.4.*
95+
RUBYWILD="$(echo ${{package.version}} | cut -d. -f-2).*"
96+
97+
RUBYDIR=${{targets.destdir}}${{vars.prefix}}/lib/ruby/$RUBYWILD
98+
rm -rf ${RUBYDIR}/bundler
99+
rm -f ${RUBYDIR}/bundler.rb
100+
101+
GEMDIR=${{targets.destdir}}${{vars.prefix}}/lib/ruby/gems/$RUBYWILD
102+
rm -rf ${GEMDIR}/gems/bundler-*
103+
rm -f ${GEMDIR}/specifications/default/bundler-*.gemspec
104+
105+
rm -f ${{targets.destdir}}/usr/bin/bundle \
106+
${{targets.destdir}}/usr/bin/bundler
107+
108+
- runs: |
109+
find ${{targets.destdir}} -name 'mkmf.log' -exec rm {} \;
110+
111+
subpackages:
112+
- name: "ruby-3.4-doc"
113+
description: "ruby documentation"
114+
pipeline:
115+
- uses: split/manpages
116+
- runs: |
117+
mkdir -p "${{targets.subpkgdir}}"/usr/share
118+
mv "${{targets.destdir}}"/usr/share/doc "${{targets.subpkgdir}}"/usr/share/
119+
mv "${{targets.destdir}}"/usr/share/ri "${{targets.subpkgdir}}"/usr/share/
120+
121+
- name: "ruby-3.4-dev"
122+
description: "ruby development headers"
123+
pipeline:
124+
- uses: split/dev
125+
test:
126+
pipeline:
127+
- uses: test/pkgconf
128+
129+
update:
130+
enabled: true
131+
version-transform:
132+
- match: "_"
133+
replace: .
134+
github:
135+
identifier: ruby/ruby
136+
strip-prefix: v
137+
use-tag: true
138+
tag-filter-prefix: v3_4_
139+
140+
test:
141+
pipeline:
142+
- runs: |
143+
ruby --version | grep ${{package.version}}
144+
145+
cat <<EOF >> /tmp/hello.rb
146+
puts("Hello Wolfi!")
147+
EOF
148+
149+
ruby /tmp/hello.rb
150+
erb --version
151+
gem --version
152+
gem --help
153+
irb --version
154+
irb --help
155+
racc --version
156+
rake --version
157+
rake --help
158+
rdbg --version
159+
rdbg --help
160+
rdoc --version
161+
rdoc --help
162+
ri --version
163+
ri --help
164+
ruby --help

ruby3.4-aes_key_wrap.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
package:
2+
name: ruby3.4-aes_key_wrap
3+
version: 1.1.0
4+
epoch: 0
5+
description: A Ruby implementation of AES Key Wrap, a.k.a RFC 3394, a.k.a NIST Key Wrap.
6+
copyright:
7+
- license: MIT
8+
9+
environment:
10+
contents:
11+
packages:
12+
- build-base
13+
- busybox
14+
- ca-certificates-bundle
15+
- git
16+
- ruby-${{vars.rubyMM}}
17+
- ruby-${{vars.rubyMM}}-dev
18+
19+
pipeline:
20+
- uses: git-checkout
21+
with:
22+
expected-commit: 7749c8d6dbc80a1544aea5d0da09b0380cbd9e57
23+
repository: https://github.com/tomdalling/aes_key_wrap
24+
tag: v${{package.version}}
25+
26+
- uses: ruby/unlock-spec
27+
28+
- uses: ruby/build
29+
with:
30+
gem: ${{vars.gem}}
31+
32+
- uses: ruby/install
33+
with:
34+
gem: ${{vars.gem}}
35+
version: ${{package.version}}
36+
37+
- uses: ruby/clean
38+
39+
test:
40+
environment:
41+
contents:
42+
packages:
43+
- ruby-${{vars.rubyMM}}
44+
pipeline:
45+
- runs: |
46+
ruby <<-EOF
47+
require 'aes_key_wrap'
48+
require 'test/unit'
49+
include Test::Unit::Assertions
50+
51+
# Define KEK, plaintext key, and IV as per documentation
52+
plaintext_key = ['00112233445566778899AABBCCDDEEFF'].pack('H*') # 16-byte binary string
53+
kek = ['000102030405060708090A0B0C0D0E0F'].pack('H*') # 16-byte binary string
54+
iv = ['DEADBEEFC0FFEEEE'].pack("H*") # 8-byte binary string
55+
56+
# Test wrapping with IV
57+
wrapped_key = AESKeyWrap.wrap(plaintext_key, kek, iv)
58+
assert wrapped_key && wrapped_key.bytesize > 0, "Wrapped key should not be empty"
59+
puts "Wrap test passed"
60+
61+
# Test unwrapping with IV
62+
unwrapped_key = AESKeyWrap.unwrap(wrapped_key, kek, iv)
63+
assert_equal plaintext_key, unwrapped_key, "Unwrapped key should match the original plaintext key"
64+
puts "Unwrap test passed"
65+
66+
puts "Basic wrap/unwrap test with explicit IV passed"
67+
EOF
68+
69+
vars:
70+
gem: aes_key_wrap
71+
72+
update:
73+
enabled: true
74+
github:
75+
identifier: tomdalling/aes_key_wrap
76+
strip-prefix: v
77+
use-tag: true
78+
79+
var-transforms:
80+
- from: ${{package.name}}
81+
match: ^ruby(\d\.\d+)-.*
82+
replace: $1
83+
to: rubyMM

ruby3.4-attr_required.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
package:
2+
name: ruby3.4-attr_required
3+
version: 1.0.2
4+
epoch: 0
5+
description: attr_required and attr_optional
6+
copyright:
7+
- license: MIT
8+
9+
environment:
10+
contents:
11+
packages:
12+
- build-base
13+
- busybox
14+
- ca-certificates-bundle
15+
- git
16+
- ruby-${{vars.rubyMM}}
17+
- ruby-${{vars.rubyMM}}-dev
18+
19+
pipeline:
20+
- uses: git-checkout
21+
with:
22+
repository: https://github.com/nov/attr_required
23+
tag: v${{package.version}}
24+
expected-commit: a48a5f1f83bffff24a58b96c30b8a5cf15c56d8f
25+
26+
- uses: ruby/build
27+
with:
28+
gem: ${{vars.gem}}
29+
30+
- uses: ruby/install
31+
with:
32+
gem: ${{vars.gem}}
33+
version: ${{package.version}}
34+
35+
- uses: ruby/clean
36+
37+
vars:
38+
gem: attr_required
39+
40+
test:
41+
environment:
42+
contents:
43+
packages:
44+
- ruby-${{vars.rubyMM}}
45+
pipeline:
46+
- runs: |
47+
ruby <<-EOF
48+
require 'attr_required'
49+
require 'test/unit'
50+
51+
class SimpleAttrTest < Test::Unit::TestCase
52+
class TestClass
53+
include AttrRequired
54+
attr_required :name
55+
end
56+
57+
def test_required_attribute
58+
obj = TestClass.new
59+
obj.name = "Alice"
60+
assert_equal "Alice", obj.name
61+
puts "attr_required test passed."
62+
end
63+
end
64+
EOF
65+
66+
update:
67+
enabled: true
68+
github:
69+
identifier: nov/attr_required
70+
strip-prefix: v
71+
use-tag: true
72+
73+
var-transforms:
74+
- from: ${{package.name}}
75+
match: ^ruby(\d\.\d+)-.*
76+
replace: $1
77+
to: rubyMM

0 commit comments

Comments
 (0)