Spec URL: http://mifo.sk/RPMS/rubygem-json_pure.spec SRPM URL: http://mifo.sk/RPMS/rubygem-json_pure-1.4.3-1.fc13.src.rpm Description: This is a implementation of the JSON specification according to RFC 4627 www.ietf.org/rfc/rfc4627.txt . Starting from version 1.0.0 on there will be two variants available: A pure ruby variant, that relies on the iconv and the stringscan extensions, which are both part of the ruby standard library. The quite a bit faster C extension variant, which is in parts implemented in C and comes with its own unicode conversion functions and a parser generated by the ragel state machine compiler www.cs.queensu.ca/~thurston/ragel .
Just quick note: We already have 'json' packaged for Fedora. This one is needed for Cucumber update. Binary objects under tests directory are removed (%check), because they are only needed for test as an generators. This gem doesn't have any binary extensions left after build. rpmlint: No errors, couple macro warnings. koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=2333213
(In reply to comment #1) > We already have 'json' packaged for Fedora. This one is needed for Cucumber > update. So 's/json_pure/json/' in cucumber (0.8.5, maybe?) wouldn't be enough?
I think this could be also possible solution, but it would not be bad to have a 'pure' version packaged. Also IMHO it will be much more cleaner to have 'original' dependency for cucumber than modifying cucumber spec file. Cucumber and other projects uses this because it's a "little bit" faster that original one.
Well, the problem is that - rubygem-json already installs %{_bindir}/edit_json, %{_bindir}/prettify_json. So installing both rubygem-json, rubygem-json_pure may easily makes rpm conflict. - if ruby -rubygems -e "require 'json'" is to be executed, we are not sure if we are using pure json ext/ or C module json ext/ By the way (In reply to comment #3) > Cucumber and other projects uses this because it's a "little bit" faster that > original one. - Is it true that "pure" implementation is faster than C extension? For spec file: - For Fedora, BuildRoot tag is no longer needed (only needed for EPEL5) - If the license is "the same as Ruby", the license tag should be "GPLv2 or Ruby". - edit_json ahd prettify_json have the dependency for ruby(gtk2), so this package should have "Requires: ruby(gtk2)". For this issue, see the discussion on bug 589801 - "install.rb" "ext/" files or directories are not needed * ext/ directory is for generating C extension modules. For pure implementation, this directory should not be used. By the way: (In reply to comment #1) > Binary objects under tests directory are removed (%check), because they > are only needed for test as an generators. - I think Rakefile should be patched so that "$ rake check" also uses pure "generator" (lib/json/pure/generator.rb) instead of C extension generator.so (i.e so that ext/ directory is not needed even for rake check, if this gem is for pure implementation, and we want to check pure implementation on test) - "benchmarks/" "tools/" "data/" "tests/" directories does not seem to be needed by default and it seems they are just documents, examples or so. Please mark these as %doc, or instead moving these directories (and ri document files) to -doc subpackage is preferred. - defined %ruby_sitelib macro seems used nowhere. - The directory %{geminstdir} is not owned by any packages.
(In reply to comment #4) > Well, the problem is that > - rubygem-json already installs %{_bindir}/edit_json, %{_bindir}/prettify_json. > So installing both rubygem-json, rubygem-json_pure may easily makes > rpm conflict. > - if ruby -rubygems -e "require 'json'" is to be executed, we are not > sure if we are using pure json ext/ or C module json ext/ Ah ok, I see. There might be solution in prefixing these two binaries with '_pure'. But I'm not sure if there will not be another conflicts. So I'll try updating cucumber with just 'json' and we will see. > > By the way > (In reply to comment #3) > > Cucumber and other projects uses this because it's a "little bit" faster that > > original one. > - Is it true that "pure" implementation is faster than C extension? According to [1], 'pure' parser seems to be faster: [snip] # 1 ParserBenchmarkExt#parser 900 repeats: # 553.922304770 ( real) -> 21.500x # 0.001805307 # 3 ParserBenchmarkPure#parser 1000 repeats: # 26.755020642 ( real) -> 1.038x # 0.037376163 [/snip] (but I'm not sure if my undestanding of these benchmarks is right. > For spec file: > - For Fedora, BuildRoot tag is no longer needed (only needed for EPEL5) Fixed. > - If the license is "the same as Ruby", the license tag should be > "GPLv2 or Ruby". Fixed. > - edit_json ahd prettify_json have the dependency for ruby(gtk2), > so this package should have "Requires: ruby(gtk2)". > For this issue, see the discussion on bug 589801 Fixed. > - "install.rb" "ext/" files or directories are not needed > * ext/ directory is for generating C extension modules. For > pure implementation, this directory should not be used. Removed. > By the way: > (In reply to comment #1) > > Binary objects under tests directory are removed (%check), because they > > are only needed for test as an generators. > - I think Rakefile should be patched so that "$ rake check" also uses > pure "generator" (lib/json/pure/generator.rb) instead of > C extension generator.so (i.e so that ext/ directory is not > needed even for rake check, if this gem is for pure implementation, > and we want to check pure implementation on test) Fixed. Rakefile already contains 'rake test_pure' which will use 'pure' generator. > - "benchmarks/" "tools/" "data/" "tests/" directories does not seem > to be needed by default and it seems they are just documents, > examples or so. > Please mark these as %doc, or instead moving these directories > (and ri document files) to -doc subpackage is preferred. Fixed. (Moved to -docs subpackage) > - defined %ruby_sitelib macro seems used nowhere. Fixed. > - The directory %{geminstdir} is not owned by any packages. Fixed. rev -2: Spec URL: http://mifo.sk/RPMS/rubygem-json_pure.spec SRPM URL: http://mifo.sk/RPMS/rubygem-json_pure-1.4.3-2.fc13.src.rpm
For -2: * BuildRoot - So I still see that you put BuildRoot tag in your spec file. Are you going to import this package also for EPEL? - Note that currently ruby-gtk2 is not available on EPEL. * BuildRequires - Would you check if "BR: ruby-"devel"" is needed? * Removing files in %check - Modifying or removing files should not be done in %check (%check section is for checking). Please move the line ----------------------------------------------------------------- rm -rf %{buildroot}/%{geminstdir}/ext ----------------------------------------------------------------- to %install. * Document files ----------------------------------------------------------------- %{gemdir}/cache/%{gemname}-%{version}.gem %{gemdir}/specifications/%{gemname}-%{version}.gemspec ----------------------------------------------------------------- - These are not documents and please move these two to main package. - License texts or so should be included in main package. Please move below to main package. ---------------------------------------------------------------- %doc %{geminstdir}/README %doc %{geminstdir}/GPL %doc %{geminstdir}/COPYING %doc %{geminstdir}/CHANGES %doc %{geminstdir}/VERSION %doc %{geminstdir}/TODO ---------------------------------------------------------------- - On the other hand, I think "%{geminstdir}/install.rb" can be moved into -doc subpackage. - Now rpmlint warns: ---------------------------------------------------------------- rubygem-json_pure-doc.noarch: W: doc-file-dependency /usr/lib/ruby/gems/1.8/gems/json_pure-1.4.3/benchmarks/generator_benchmark.rb /usr/bin/env rubygem-json_pure-doc.noarch: W: doc-file-dependency /usr/lib/ruby/gems/1.8/gems/json_pure-1.4.3/tests/test_json_encoding.rb /usr/bin/env rubygem-json_pure-doc.noarch: W: doc-file-dependency /usr/lib/ruby/gems/1.8/gems/json_pure-1.4.3/tools/server.rb /usr/bin/env rubygem-json_pure-doc.noarch: W: doc-file-dependency /usr/lib/ruby/gems/1.8/gems/json_pure-1.4.3/benchmarks/parser_benchmark.rb /usr/bin/env rubygem-json_pure-doc.noarch: W: doc-file-dependency /usr/lib/ruby/gems/1.8/gems/json_pure-1.4.3/tests/test_json_fixtures.rb /usr/bin/env rubygem-json_pure-doc.noarch: W: doc-file-dependency /usr/lib/ruby/gems/1.8/gems/json_pure-1.4.3/tests/test_json_rails.rb /usr/bin/env ---------------------------------------------------------------- These warnings can be removed by either - Removing %doc from %files entry in -doc subpackage (I don't think that explicitly writing %doc attribute in -doc subpackage is needed, because the name of the rpm already shows that the rpm is for documentation) - Or removing shebangs and removing executable permission. * Directory ownership issue - "%dir %{geminstdir}" in -doc subpackage is unneeded because main package already owns this directory (and -doc depends on main package).
By the way I see occasional failure on %check. Would you check why this is happening? http://koji.fedoraproject.org/koji/taskinfo?taskID=2373744
(In reply to comment #7) > By the way I see occasional failure on %check. > Would you check why this is happening? > > http://koji.fedoraproject.org/koji/taskinfo?taskID=2373744 Upstream contacted for this failure.
Would you update this bug?
I would love to see this packaged, as certain package seem to really want json_pure rather than just json.
I think we need json_pure for EPEL5, as JSON doesn't work perfectly with ruby 1.8.6 in EPEL5. stahnma@x2 /home/stahnma> ldd -r /usr/lib64/ruby/site_ruby/1.8/x86_64-linux/json/ext/parser.so libruby.so.1.8 => /usr/lib64/libruby.so.1.8 (0x00002abe78915000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00002abe78c10000) libdl.so.2 => /lib64/libdl.so.2 (0x00002abe78e2b000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002abe79030000) libm.so.6 => /lib64/libm.so.6 (0x00002abe79268000) libc.so.6 => /lib64/libc.so.6 (0x00002abe794eb000) /lib64/ld-linux-x86-64.so.2 (0x0000003cbb000000) undefined symbol: RSTRING_PTR (/usr/lib64/ruby/site_ruby/1.8/x86_64-linux/json/ext/parser.so) undefined symbol: RSTRING_LEN (/usr/lib64/ruby/site_ruby/1.8/x86_64-linux/json/ext/parser.so) Without these libraries, rubyforge becomes non-usable. (that's after me trying to patch rubyforge to use json rather than json_pure). rubyforge is of course needed by hoe, which is needed by lots of things.
(In reply to comment #11) > I think we need json_pure for EPEL5, as JSON doesn't work perfectly with ruby > 1.8.6 in EPEL5. - I guess 1.8.5, not 1.8.6. > stahnma@x2 /home/stahnma> ldd -r > /usr/lib64/ruby/site_ruby/1.8/x86_64-linux/json/ext/parser.so > libruby.so.1.8 => /usr/lib64/libruby.so.1.8 (0x00002abe78915000) > libpthread.so.0 => /lib64/libpthread.so.0 (0x00002abe78c10000) > libdl.so.2 => /lib64/libdl.so.2 (0x00002abe78e2b000) > libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002abe79030000) > libm.so.6 => /lib64/libm.so.6 (0x00002abe79268000) > libc.so.6 => /lib64/libc.so.6 (0x00002abe794eb000) > /lib64/ld-linux-x86-64.so.2 (0x0000003cbb000000) > undefined symbol: RSTRING_PTR > (/usr/lib64/ruby/site_ruby/1.8/x86_64-linux/json/ext/parser.so) > undefined symbol: RSTRING_LEN > (/usr/lib64/ruby/site_ruby/1.8/x86_64-linux/json/ext/parser.so) - I don't know if json (json_pure) upstream wants to support 1.8.5 any longer, however you can fix this issue on json side. See what json-1.4.3/ext/json/ext/generator/generator.h does (for RSTRING_PTR and so on definition)
ping again?
(In reply to comment #13) > ping again? Sorry for delay, I had something important to do. I updated package to match upstream version and fixed bug mentioned by Mamoru. Updated specfile and SRPM: Spec URL: http://mifo.sk/RPMS/rubygem-json_pure.spec SRPM URL: http://mifo.sk/RPMS/rubygem-json_pure-1.4.6-1.fc13.src.rpm
Well, - I saw one test fails for 3 times. One example: http://koji.fedoraproject.org/koji/taskinfo?taskID=2484993 For now please patch this test out. - The following line will make no effect. --------------------------------------------------------------- rm -rf %{buildroot}%{gemdir}/doc/json_pure-1.4.3/rdoc/classes/.html ---------------------------------------------------------------
I removed that line, but unfortunately build log expired. I did a build for this version (without patching test) and seems like it works: http://koji.fedoraproject.org/koji/taskinfo?taskID=2508205 Spec URL: http://mifo.sk/RPMS/rubygem-json_pure.spec SRPM URL: http://mifo.sk/RPMS/rubygem-json_pure-1.4.6-2.fc13.src.rpm
Umm... http://koji.fedoraproject.org/koji/taskinfo?taskID=2509174 http://koji.fedoraproject.org/koji/taskinfo?taskID=2509176 http://koji.fedoraproject.org/koji/taskinfo?taskID=2509178
(In reply to comment #17) > Umm... > > http://koji.fedoraproject.org/koji/taskinfo?taskID=2509174 > http://koji.fedoraproject.org/koji/taskinfo?taskID=2509176 > http://koji.fedoraproject.org/koji/taskinfo?taskID=2509178 Seems like, this failure happens only under F14. I removed this test anyway and I'll contact upstream to fix it. Spec URL: http://mifo.sk/RPMS/rubygem-json_pure.spec SRPM URL: http://mifo.sk/RPMS/rubygem-json_pure-1.4.6-3.fc13.src.rpm http://koji.fedoraproject.org/koji/taskinfo?taskID=2510390
--------------------------------------------------------------- This package (rubygem-json_pure) is APPROVED by mtasaka ---------------------------------------------------------------
New Package SCM Request ======================= Package Name: rubygem-json_pure Short Description: JSON implementation in pure Ruby Owners: mfojtik Branches: f12 f13 f14
Git done (by process-git-requests).
rubygem-json_pure-1.4.6-3.fc12 has been submitted as an update for Fedora 12. https://admin.fedoraproject.org/updates/rubygem-json_pure-1.4.6-3.fc12
rubygem-json_pure-1.4.6-3.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/rubygem-json_pure-1.4.6-3.fc14
rubygem-json_pure-1.4.6-3.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/rubygem-json_pure-1.4.6-3.fc13
rubygem-json_pure-1.4.6-3.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update rubygem-json_pure'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/rubygem-json_pure-1.4.6-3.fc14
rubygem-json_pure-1.4.6-3.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
rubygem-json_pure-1.4.6-3.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
Would you like to branch for EPEL? If not, I can maintain there.
rubygem-json_pure-1.4.6-3.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
Michal, do you have desire to maintain this package for epel? If not, I'd be happy to do it.
Package Change Request ====================== Package Name: rubygem-json_pure New Branches: epel7 Owners: tdawson