| Summary: | Missing files for ruby-json | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Jean-Georges Pinna <jgpinna> |
| Component: | RPM Packages | Assignee: | Pascal Terjan <pterjan> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | 9 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | ruby-json-2.6.1-44.mga9.x86_64.rpm | CVE: | |
| Status comment: | |||
| Attachments: |
content that works
The gem file from rubygems.org |
||
|
Description
Jean-Georges Pinna
2023-09-01 13:05:25 CEST
Created attachment 13963 [details]
content that works
i join a tar.gz with the json-2.6.1 gems content that works
Thank you for this very detailed report, but it is not clear exactly which files are missing (it is all very json technical!). The title talks of "Missing files". At the head of the last file list, "if i add the missing file..." Is that last list of all the missing files? FWIW It looks as if the SRPM 'ruby-json' has not altered for years, so is it the right one?. /lib/json/pure is in pkg ruby-json_pure in SRPM ruby-json_pure, which has been updated releatively recently. json/ext/parser is in pkg ruby-json in SRPM ruby. /ext/json exists in pkg php-devel, does not look relevant. None of /ext/json/* are found by urpmf, so are ? missing. [Ruby itself is currently maintained by pterjan] CC:
(none) =>
lewyssmith Created attachment 13967 [details]
The gem file from rubygems.org
I add all these file to make rake work. ./lib/json/pure ./lib/json/pure/parser.rb ./lib/json/pure/generator.rb ./ext ./ext/json ./ext/json/Makefile ./ext/json/ext ./ext/json/ext/fbuffer ./ext/json/ext/fbuffer/fbuffer.h ./ext/json/ext/generator ./ext/json/ext/generator/.sitearchdir.-.json.-.ext.time ./ext/json/ext/generator/generator.c ./ext/json/ext/generator/generator.o ./ext/json/ext/generator/generator.h ./ext/json/ext/generator/Makefile ./ext/json/ext/generator/depend ./ext/json/ext/generator/generator.so ./ext/json/ext/generator/extconf.rb ./ext/json/ext/parser ./ext/json/ext/parser/parser.rl ./ext/json/ext/parser/.sitearchdir.-.json.-.ext.time ./ext/json/ext/parser/parser.c ./ext/json/ext/parser/parser.o ./ext/json/ext/parser/parser.so ./ext/json/ext/parser/Makefile ./ext/json/ext/parser/depend ./ext/json/ext/parser/parser.h ./ext/json/ext/parser/extconf.rb ./ext/json/extconf.rb To find tese files i download the gem file from rubygems.org and extract the content. These files are in the gem file but not in the rpm file (also pure dir. I have check the json-pure-2.6.2 gemfile and it also contains pure dir) I add pure dir it because json-pure is installed on my server and in the stack trace json/pure is missing in the json-2.6.1.tar.gz file i put all the content of /usr/share/gems/gems/json-2.6.1 of my working platform I have not check if it can work with less files regards I am not sure all these files are needed Assigning this to pterjan for Ruby. CC:
lewyssmith =>
(none) I just checked ruby-json and it doesn't seem to be missing any file, and it is working correctly. Most of the files you list are source files which are not expected to be in the package, as we build it and provide the resulting libraries.
Installing ruby-json_pure package should fix the error "LoadError: cannot load such file -- json/pure" you have.
For "Ignoring bigdecimal-3.1.1 because its extensions are not built. Try: gem pristine bigdecimal --version 3.1.1" I am not sure what the problem is. There seems to be a packaging bug (ruby package contains /usr/share/ruby/bigdecimal.rb while other files are in ruby-bigdecimal package) and I also get that error message but it seems to work fine if I install ruby-bigdecimal:
$ irb
Ignoring bigdecimal-3.1.1 because its extensions are not built. Try: gem pristine bigdecimal --version 3.1.1
irb(main):001:0> require 'bigdecimal'
=> true
irb(main):002:0> puts BigDecimal("2.0") / BigDecimal("0.0")
Infinity
=> nil
(Also, rake works fine here, I tested on a few things) I just check, if I remove all these file (json_pure is installed), the command "bundle exec rake generate_secret_token" the error appens. I tried to reduce the number of files and it appears that only lib/json/pure.rb lib/json/pure/generator.rb lib/json/pure/parser.rb are necessary bigdecimal is not the problem, i run gem pristine ... and it is ok Again, json_pure seems to be working fine:
$ ruby -rjson/pure -e 'p JSON.parse("{\"x\": \"foo\"}")'
Ignoring bigdecimal-3.1.1 because its extensions are not built. Try: gem pristine bigdecimal --version 3.1.1
{"x"=>"foo"}
And it contains those files:
/usr/share/gems/gems/json_pure-2.6.2/lib/json/pure.rb
/usr/share/gems/gems/json_pure-2.6.2/lib/json/pure/generator.rb
/usr/share/gems/gems/json_pure-2.6.2/lib/json/pure/parser.rb
So it seems something you are using is not able to use that gem for some reason.
Logically, this should work, but I did the test again this morning because I prefer to avoid tinkering with the contents of the packages. I did a minimal installation, with Ruby, RubyGems, ruby-json, ruby-json-pure, then I unpacked redmine 5.0.5 in /opt, then I ran the commands to install Redmine, and when I I launched "bundle exec rake generate_secret_token" I got the same error, perhaps it is linked to the Redmine Gemfile or a problem in the ruby configuration or to the fact that ruby-json is in version 2.6.1 and ruby-json_pure in version 2.6.2 |