Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: ruby2.5: Update version from 2.5.5-3+deb10u6 to 2.5.5 3+deb10u7 #497

Open
wants to merge 2 commits into
base: warrior
Choose a base branch
from

Conversation

hiromotai7
Copy link

Purpose of pull request

This version fixes following CVEs.

ELA: ELA-1150-1

And, removed the two patches included in the new version of the debian tarball.

Test

  1. Build package
  2. Run image and ruby ptest on the qemuarm64 environment

How to test the package

  1. Build qemuarm64 image
  2. Run qemu image
  3. Prepare ruby ptest
  4. Run ruby ptest

Build qemuarm64 image

Add the following to local.conf.

MACHINE = "qemuarm64"
IMAGE_INSTALL_append = " ruby ruby-ptest"

And build the qemuarm64 image.

$ bitbake core-image-minimal

Run qemu image

$ runqemu qemuarm64 slirq nographic qemuparams="-smp 8 -m 8192"

Prepare ruby ptest

"test_deadlock_by_signal_at_forking" test may fail because of the computer resources lack on which it runs.
It can be avoid by increasing the timeout duration.
The difference of increasing timeouts is as following.

--- /usr/lib/ruby/ptest/test/ruby/test_process.rb.original
+++ /usr/lib/ruby/ptest/test/ruby/test_process.rb
@@ -2167,7 +2167,7 @@
   end

   def test_deadlock_by_signal_at_forking
-    assert_separately(["-", RUBY], <<-INPUT, timeout: 80)
+    assert_separately(["-", RUBY], <<-INPUT, timeout: 100)
       ruby = ARGV.shift
       GC.start # reduce garbage
       GC.disable # avoid triggering CoW after forks```

Run ruby ptest

# ptest-runner ruby | tee "ruby-test.log"

Test result

Build package

Build succeeded.

$ bitbake ruby
Loading cache: 100% |###################################################| Time: 0:00:00
Loaded 2382 entries from dependency cache.
Parsing recipes: 100% |#################################################| Time: 0:00:00
Parsing of 1360 .bb files complete (1359 cached, 1 parsed). 2382 targets, 81 skipped, 6 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.42.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-emlinux-linux"
MACHINE              = "qemuarm64"
DISTRO               = "emlinux"
DISTRO_VERSION       = "2.10"
TUNE_FEATURES        = "aarch64 armv8a crc"
TARGET_FPU           = ""
meta
meta-yocto-bsp       = "HEAD:d4b57c68b22027c2bedff335dee06af963e4f8a8"
meta-debian          = "HEAD:14a35eb170b7cbd02f51f3de298c99ca347bdfa5"
meta-debian-extended = "update-ruby2.5_2.5.5-3+deb10u7:09520e1e8b307c6c744d3926f8852bc667b87b05"
meta-emlinux         = "HEAD:1620f3c73bbcef7eaa0cdec73ae47851d9d8064d"
meta-emlinux-private = "HEAD:3534c7782ba150055729db6720e5c10264c2d0e7"

WARNING: /home/miracle/workspace/proj-emlinux2/EML-3033/build/../repos/meta-debian-extended/recipes-debian/ruby/ruby_debian.bb.do_unpack is tainted from a forced run
Initialising tasks: 100% |##############################################| Time: 0:00:00
Sstate summary: Wanted 7 Found 7 Missed 0 Current 466 (100% match, 100% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2178 tasks of which 2177 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.

Package test

No difference in test results before and after update. No regression.

Previous version:

root@qemuarm64:~# grep '^FAIL' ruby-test.log
FAIL: (EXPECTED) test/mkmf/test_constant.rb
FAIL: (EXPECTED) test/mkmf/test_convertible.rb
FAIL: (EXPECTED) test/mkmf/test_flags.rb
FAIL: (EXPECTED) test/mkmf/test_have_func.rb
FAIL: (EXPECTED) test/mkmf/test_have_library.rb
FAIL: (EXPECTED) test/mkmf/test_have_macro.rb
FAIL: (EXPECTED) test/mkmf/test_signedness.rb
FAIL: (EXPECTED) test/mkmf/test_sizeof.rb
FAIL: (EXPECTED) test/ripper/test_files.rb
FAIL: (EXPECTED) test/ruby/test_fiber.rb
FAIL: (EXPECTED) test/ruby/test_io.rb
FAIL: (EXPECTED) test/rubygems/test_gem.rb
FAIL: (EXPECTED) test/rubygems/test_gem_commands_environment_command.rb
FAIL: (EXPECTED) test/rubygems/test_gem_commands_update_command.rb
FAIL: test/socket/test_udp.rb
root@qemuarm64:~# tail -n 12 ruby-test.log

Finished
--------
   Tests executed: 749
             PASS: 734
             FAIL: 1
EXPECTED FAILURES: 14

DURATION: 3464
END: /usr/lib/ruby/ptest
2025-01-09T09:44
STOP: ptest-runner

This version:

root@qemuarm64:~# grep '^FAIL' ruby-test.log
FAIL: (EXPECTED) test/mkmf/test_constant.rb
FAIL: (EXPECTED) test/mkmf/test_convertible.rb
FAIL: (EXPECTED) test/mkmf/test_flags.rb
FAIL: (EXPECTED) test/mkmf/test_have_func.rb
FAIL: (EXPECTED) test/mkmf/test_have_library.rb
FAIL: (EXPECTED) test/mkmf/test_have_macro.rb
FAIL: (EXPECTED) test/mkmf/test_signedness.rb
FAIL: (EXPECTED) test/mkmf/test_sizeof.rb
FAIL: (EXPECTED) test/ripper/test_files.rb
FAIL: (EXPECTED) test/ruby/test_fiber.rb
FAIL: (EXPECTED) test/ruby/test_io.rb
FAIL: (EXPECTED) test/rubygems/test_gem.rb
FAIL: (EXPECTED) test/rubygems/test_gem_commands_environment_command.rb
FAIL: (EXPECTED) test/rubygems/test_gem_commands_update_command.rb
FAIL: test/socket/test_udp.rb
root@qemuarm64:~# tail -n 12 ruby-test.log

Finished
--------
   Tests executed: 749
             PASS: 734
             FAIL: 1
EXPECTED FAILURES: 14

DURATION: 3560
END: /usr/lib/ruby/ptest
2025-01-08T09:37
STOP: ptest-runner

Hirotaka Motai added 2 commits January 8, 2025 15:36
This version fixes following CVEs.

- CVE-2023-36617
- CVE-2024-27280
- CVE-2024-27281
- CVE-2024-27282

ELA: ELA-1150-1

Signed-off-by: Hirotaka Motai <hirotaka.motai@miraclelinux.com>
The two patches have already been applied by updating package version of
ruby-2.5 from 2.5.5-3+deb10u6 to 2.5.5-3+deb10u7.

Signed-off-by: Hirotaka Motai <hirotaka.motai@miraclelinux.com>
@hiromotai7 hiromotai7 self-assigned this Jan 10, 2025
@hiromotai7 hiromotai7 changed the title ruby2.5: Update version from 2.5.5-3+deb10u6 to 2.5.5 3+deb10u7 Draft: ruby2.5: Update version from 2.5.5-3+deb10u6 to 2.5.5 3+deb10u7 Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant