FS#70201 - [ruby] racc is broken

Attached to Project: Arch Linux
Opened by Olivier Médoc (oliv) - Monday, 29 March 2021, 06:51 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 26 September 2023, 06:10 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:


Additional info:
* ruby 2.7.2-1

Steps to reproduce:

1/ install ruby
2/ run racc

$ racc
Traceback (most recent call last):
1: from /usr/bin/racc:23:in `<main>'
/usr/bin/racc:23:in `load': cannot load such file -- /usr/lib/ruby/gems/2.7.0/gems/racc-1.4.16/bin/racc (LoadError)

This task depends upon

Closed by  Toolybird (Toolybird)
Tuesday, 26 September 2023, 06:10 GMT
Reason for closing:  Fixed
Additional comments about closing:  ruby-racc and ruby-erb are now in the repos.
Comment by Olivier Médoc (oliv) - Monday, 29 March 2021, 06:53 GMT
The workaround is to install racc through ruby gem:
# gem install racc
Comment by Anatol Pomozov (anatolik) - Monday, 29 March 2021, 17:24 GMT
'racc' and 'erb' launch scripts are part of ruby package. But they are separate gems and should be represented as dedicated arch package (ruby-racc and ruby-erb).
Comment by loqs (loqs) - Wednesday, 31 March 2021, 01:35 GMT
Something like the attached?
Comment by Anatol Pomozov (anatolik) - Thursday, 01 April 2021, 17:47 GMT
@Ioqs yes, something like this.

How actively racc and erb are used by the development community? Could these packages stay in AUR (for now at least)? Or they absolutely need to be a part of Arch repos?
Comment by Anatol Pomozov (anatolik) - Saturday, 03 April 2021, 18:30 GMT
ruby-racc is already part of AUR and I think erb is a great candidate for it. I dropped racc/erb bin launchers from ruby 3.0 package.
Comment by loqs (loqs) - Saturday, 03 April 2021, 19:01 GMT
usr/lib/ruby/3.0.0/racc.rb
usr/lib/ruby/3.0.0/racc/
usr/lib/ruby/3.0.0/racc/compat.rb
usr/lib/ruby/3.0.0/racc/debugflags.rb
usr/lib/ruby/3.0.0/racc/exception.rb
usr/lib/ruby/3.0.0/racc/grammar.rb
usr/lib/ruby/3.0.0/racc/grammarfileparser.rb
usr/lib/ruby/3.0.0/racc/info.rb
usr/lib/ruby/3.0.0/racc/iset.rb
usr/lib/ruby/3.0.0/racc/logfilegenerator.rb
usr/lib/ruby/3.0.0/racc/parser-text.rb
usr/lib/ruby/3.0.0/racc/parser.rb
usr/lib/ruby/3.0.0/racc/parserfilegenerator.rb
usr/lib/ruby/3.0.0/racc/pre-setup
usr/lib/ruby/3.0.0/racc/sourcetext.rb
usr/lib/ruby/3.0.0/racc/state.rb
usr/lib/ruby/3.0.0/racc/statetransitiontable.rb
usr/lib/ruby/3.0.0/racc/static.rb
usr/lib/ruby/3.0.0/x86_64-linux/racc/
usr/lib/ruby/3.0.0/x86_64-linux/racc/cparse.so
usr/lib/ruby/gems/3.0.0/specifications/default/racc-1.5.1.gemspec
usr/lib/ruby/3.0.0/erb.rb
usr/lib/ruby/gems/3.0.0/specifications/default/erb-2.2.0.gemspec

Are still needed by the ruby package?
Comment by Anatol Pomozov (anatolik) - Saturday, 03 April 2021, 22:30 GMT
Note that this path (/usr/lib/ruby/3.0.0/racc/) does not conflict with libraries installed as gem (/usr/lib/ruby/gems/3.0.0/gems/racc-X.X.X/) and it can coexist together. The main goal of removing /usr/bin/ is to remove files conflicting with AUR ruby-* packages.

> Are still needed by the ruby package?
ruby packaging a bit weird. from one side they try to decouple the libraries into separate gem from other side there many interdependencies.

For racc it is:
lib/rdoc/rd/block_parser.rb:8:require 'racc/parser.rb'
lib/rdoc/rd/inline_parser.rb:8:require 'racc/parser.rb'

so we can probably remove racc sources and then add ruby-racc to [community] and make ruby-rdoc depend on it.

For erb the situation a bit more complicated:

➜ ruby git grep erb | grep require
benchmark/app_erb.yml:5: require 'erb'
benchmark/erb_render.yml:2: require 'erb'
benchmark/lib/benchmark_driver/runner/mjit.rb:3:require 'erb'
benchmark/lib/benchmark_driver/runner/mjit_exec.rb:3:require 'erb'
benchmark/lib/benchmark_driver/runner/ractor.rb:1:require 'erb'
enc/make_encmake.rb:10:require 'erb'
ext/etc/mkconstants.rb:3:require 'erb'
ext/ripper/tools/preproc.rb:99: require 'erb'
ext/socket/mkconstants.rb:3:require 'erb'
lib/bundler/installer.rb:139: require "erb"
lib/bundler/installer.rb:186: require "erb"
lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb:1:require "erb"
lib/rdoc/erbio.rb:2:require 'erb'
lib/rdoc/generator/darkfish.rb:4:require 'erb'
lib/rdoc/servlet.rb:3:require 'erb'
lib/rubygems/server.rb:3:require 'erb'
libexec/erb:6:require 'erb'
sample/ripper/ruby2html.rb:34:require 'erb'
spec/ruby/library/erb/def_class_spec.rb:1:require 'erb'
spec/ruby/library/erb/def_method_spec.rb:1:require 'erb'
spec/ruby/library/erb/def_module_spec.rb:1:require 'erb'
spec/ruby/library/erb/defmethod/def_erb_method_spec.rb:1:require 'erb'
spec/ruby/library/erb/filename_spec.rb:1:require 'erb'
spec/ruby/library/erb/new_spec.rb:1:require 'erb'
spec/ruby/library/erb/result_spec.rb:1:require 'erb'
spec/ruby/library/erb/run_spec.rb:1:require 'erb'
spec/ruby/library/erb/src_spec.rb:1:require 'erb'
spec/ruby/library/erb/util/h_spec.rb:1:require 'erb'
spec/ruby/library/erb/util/html_escape_spec.rb:1:require 'erb'
spec/ruby/library/erb/util/u_spec.rb:1:require 'erb'
spec/ruby/library/erb/util/url_encode_spec.rb:1:require 'erb'
test/erb/test_erb.rb:4:require 'erb'
test/erb/test_erb_m17n.rb:4:require 'erb'
tool/generic_erb.rb:6:require 'erb'
tool/lib/webrick/httpservlet/erbhandler.rb:14:require 'erb'
tool/ruby_vm/helpers/dumper.rb:14:require 'erb'
tool/transcode-tblgen.rb:4:require 'erb'


So many more core libraries need erb. It requires much more efforts to remove erb.rb from the core.
Comment by Stefan Majewsky (majewsky) - Wednesday, 28 April 2021, 09:23 GMT
FWIW, I tripped over this change just now and was very confused why my scripting broke until I found this bug report. A news on the website about the erb change would be nice.
Comment by Akash Patel (acxz) - Wednesday, 13 July 2022, 21:40 GMT
I have created an AUR package from loqs's PKGBUILD temporarily until `ruby-erb` ends up in [community]. See: https://aur.archlinux.org/packages/ruby-erb
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...