Attached is a debdiff for jammy which solves this issue.

** Summary changed:

- ruby-curses: Emits warning: "rb_safe_level will be removed in Ruby 3.0", 
affects at least irqtop
+ drop rb_safe_level() from ruby-curses to fix irqtop from missing symbols and 
deprecation warnings

** Description changed:

- irqtop emits the following warning:
-     /usr/bin/irqtop:545: warning: rb_safe_level will be removed in Ruby 3.0
- This warning clutters the whole screen and makes irqtop unusable.
+ [Impact]
  
- My config:
- Kernel: 5.4.0-58-lowlatency #64-Ubuntu SMP PREEMPT x86_64 GNU/Linux
- irqtop: 2.4-2ubuntu0.2
- ruby: 1:2.7+1
- ruby-curses: 1.2.4-1build1
- ethtool: 1:5.4-1
+ rb_safe_level() had been marked for deprecation for some time, and was
+ finally removed in Ruby 3.0.
+ 
+ ruby-curses uses rb_safe_level(), and it causes issues with its
+ rdepends, most notably irqtop.
+ 
+ irqtop is unusuable on Jammy, with it failing to start due to not
+ finding the rb_safe_level symbol.
+ 
+ $ sudo irqtop
+ 
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in 
`require': /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/3.0.0/curses.so: 
undefined symbol: rb_safe_level - 
/usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/3.0.0/curses.so (LoadError)
+       from 
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in 
`require'
+       from /usr/lib/ruby/vendor_ruby/curses.rb:18:in `rescue in <top 
(required)>'
+       from /usr/lib/ruby/vendor_ruby/curses.rb:14:in `<top (required)>'
+       from 
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in 
`require'
+       from 
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in 
`require'
+       from /usr/bin/irqtop:9:in `<main>'
+ 
+ On Focal, irqtop fills the screen with deprecation warnings making the
+ tool unusable.
+ 
+ /usr/bin/irqtop:545: warning: rb_safe_level will be removed in Ruby 3.0
+ 
+ [Testcase]
+ 
+ $ sudo apt install irqtop
+ $ sudo irqtop
+ 
+ On Jammy:
+ Check to see if the tool launches, and you no longer get the "undefined 
symbol: rb_safe_level - 
/usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/3.0.0/curses.so (LoadError)" error.
+ 
+ on Focal:
+ Launch the tool, press enter several times to refresh the results. There 
should be no mention of "/usr/bin/irqtop:545: warning: rb_safe_level will be 
removed in Ruby 3.0", and the tool should be readable.
+ 
+ Test packages are available in the following ppa:
+ 
+ https://launchpad.net/~mruffell/+archive/ubuntu/sf385554-test
+ 
+ If you install the test packages, irqtop will function normally.
+ 
+ [Where Problems Could Occur]
+ 
+ We are removing a long deprecated string safety check, which I assure
+ you, does not change the security of the tools using the ruby-curses
+ library, due to most levels being disabled already in ruby itself.
+ 
+ As for the effect on the programs that depend on ruby-curses, ruby-
+ curses only has 2 redepends, one of which is irqtop:
+ 
+ $ apt rdepends ruby-curses
+ ruby-curses
+ Reverse Depends:
+   Depends: irqtop
+   Depends: ruby-blade
+ 
+ If a regression were to occur, it would only impact irqtop and ruby-
+ blade users. Users could downgrade ruby-curses while a fix is developed.
+ 
+ [Other Info]
+ 
+ This was fixed in the below commit, in version 1.3.2:
+ 
+ commit a9b9db9b5d5a4b52e3d0e0eaf0fbb2be839a3c29
+ From: Eric Wong <[email protected]>
+ Date: Sat, 30 Nov 2019 01:45:21 +0000
+ Subject: drop rb_safe_level check
+ Link: 
https://github.com/ruby/curses/commit/a9b9db9b5d5a4b52e3d0e0eaf0fbb2be839a3c29
+ 
+ Both Focal and Jammy required a backport. Only window and mouse events
+ are implemented in 1.2.4, so I removed the hunks that targeted events
+ that were implemented later.

** Patch added: "Debdiff for ruby-curses on jammy"
   
https://bugs.launchpad.net/ubuntu/+source/ruby-curses/+bug/1907932/+attachment/5779432/+files/lp1907932_jammy.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1907932

Title:
  drop rb_safe_level() from ruby-curses to fix irqtop from missing
  symbols and deprecation warnings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ruby-curses/+bug/1907932/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to