Bug 589801
Summary: | rubygem-json requires gtk...why? | ||
---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Michael Stahnke <mastahnke> |
Component: | rubygem-json | Assignee: | Xavier Lamien <lxtnow> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | el5 | CC: | lxtnow, mtasaka |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | rubygem-json-1.4.3-3.el5 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-09-14 17:30:43 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 588364 |
Description
Michael Stahnke
2010-05-06 22:04:28 UTC
Hello, I was the reviewer of rubygem-json. This is because /usr/bin/edit_json.rb surely requires gtk2. https://bugzilla.redhat.com/show_bug.cgi?id=504424#c3 - /usr/bin/edit_json.rb: 19 load Gem.bin_path('json', 'edit_json.rb', version) - /usr/lib/ruby/gems/1.8/gems/json-1.1.9/lib/json/editor.rb 1 # To use the GUI JSON editor, start the edit_json.rb executable script. It 2 # requires ruby-gtk to be installed. 3 4 require 'gtk2' However installing ruby-gtk2 surely adds many additional dependency. Also I am not sure how often edit_json.rb is used. So the possible solution is: - seave this dependency as it is - split out edit_json.rb related files into subpackage How do you think, Xavier and Michael? (Maybe it is better that this is discussed on ruby-sig mailing list) (By the way splitting out edit_json.rb related files means that on EL-5 these files should be _deleted_ if ruby-gnome2 does not exist on EL-5) I think at minimum we should split out edit_json.rb into another sub-package. It still seems odd to me to require it. Things like puppet can use ruby-ldap for certain feature, or active_record, but the puppet package doesn't require them to install, only if you want to use certain features would you need those. I'll vote for sub-packaging in this case. I am happy to discuss on ruby-sig list also. Hey, Yeah, split it out would be good. Will take care of this this weekend. Okay, then let's split out the 2 files - /usr/bin/edit_json.rb - /usr/lib/ruby/gems/1.8/gems/json-1.1.9/lib/json/editor.rb into -gui subpackage or so. (Note that ruby-gnome2 does not exist on EPEL-5 currently, so on EPEL-5 these files should be removed because these files won't work anyway due to missing dependency) Fixed. 2 issues: A. for EL-5 package: -------------------------------------------------------------- # rpm -qp --requires rubygem-json-1.4.3-1.el5.i386.rpm | grep gtk2 ruby(gtk2) -------------------------------------------------------------- So ruby(gtk2) dependency still remains. B. for F-14/13 package: -------------------------------------------------------------- # env LANG=C rpm -Uvh rubygem-json-1.4.3-1.fc13.i686.rpm ruby-json-1.4.3-1.fc13.i686.rpm Preparing... ########################################### [100%] 1:rubygem-json ########################################### [ 50%] 2:ruby-json ########################################### [100%] # rpm -ql ruby-json | grep edit /usr/lib/ruby/site_ruby/1.8/json/editor.rb # ls -al /usr/lib/ruby/site_ruby/1.8/json/editor.rb lrwxrwxrwx 1 root root 52 2010-05-10 04:13 /usr/lib/ruby/site_ruby/1.8/json/editor.rb -> ../../../gems/1.8/gems/json-1.4.3/lib/json/editor.rb # env LANG=C cat /usr/lib/ruby/site_ruby/1.8/json/editor.rb cat: /usr/lib/ruby/site_ruby/1.8/json/editor.rb: No such file or directory -------------------------------------------------------------- With only rubygem-json and ruby-json installed, /usr/lib/ruby/site_ruby/1.8/json/editor.rb (in ruby-json) becomes a broken symlink because /usr/lib/ruby/gems/1.8/gems/json-1.4.3/lib/json/editor.rb is in rubygem-json-gui. By the way for F-13 / EPEL-5, the rebuilt packages have to be submitted on bodhi. #comment 7 Craps, forget to remove it as well in epel #comment 8 Yeah, know that. I was just waiting a review from you before push anything. Will fix this today. Mamoru, I did a rebuild yesterday, could you test before i request a push? thx, Hi: For EL-5: --------------------------------------------------- # Also remove gtk2 editor as ruby-gnome2 is not in rhel5 find $RPM_BUILD_ROOT -name "editor.rb" -a -name "edit_json.rb" -exec rm {} \; --------------------------------------------------- I guess this does nothing... (I guess "-or" instead of "-a") For F-13: When only rubygem-json and rubygem-json-gui are installed: ---------------------------------------------------- # rubygem-json-1.4.3-2.fc13.i686.rpm rubygem-json-gui-1.4.3-2.fc13.i686.rpm Preparing... ########################################### [100%] 1:rubygem-json ########################################### [ 50%] 2:rubygem-json-gui ########################################### [100%] # rpm -qf /usr/lib/ruby/site_ruby/1.8/json/editor.rb rubygem-json-gui-1.4.3-2.fc13.i686 # rpm -qf /usr/lib/ruby/site_ruby/1.8/json file /usr/lib/ruby/site_ruby/1.8/json is not owned by any package ----------------------------------------------------- With -2, the directory /usr/lib/ruby/site_ruby/1.8/json is owned by ruby-json (and rubygem-json-gui should not require ruby-json) One resolution is to create ruby-json-gui package, move /usr/lib/ruby/site_ruby/1.8/json/editor.rb to ruby-json-gui, and make ruby-json-gui have "Requires: ruby-json" (although in this case ruby-json-gui has only one file...) >One resolution is to create ruby-json-gui package, move
>/usr/lib/ruby/site_ruby/1.8/json/editor.rb to ruby-json-gui, and
>make ruby-json-gui have "Requires: ruby-json" (although
>in this case ruby-json-gui has only one file...)
I'd vote for this. It would be much easier for EPEL, I think.
nod. will fix this asap Any update on this for EPEL? It's blocking a bug I have open. Ho craps, thanks for the head's up. Will look at it in a few hours. (In reply to comment #11) > Hi: > > For EL-5: > --------------------------------------------------- > # Also remove gtk2 editor as ruby-gnome2 is not in rhel5 > find $RPM_BUILD_ROOT -name "editor.rb" -a -name "edit_json.rb" -exec rm {} \; > --------------------------------------------------- > I guess this does nothing... (I guess "-or" instead of "-a") looks like this option doesn't work as expected. Fixed. > > For F-13: > When only rubygem-json and rubygem-json-gui are installed: > ---------------------------------------------------- > # rubygem-json-1.4.3-2.fc13.i686.rpm rubygem-json-gui-1.4.3-2.fc13.i686.rpm > Preparing... ########################################### [100%] > 1:rubygem-json ########################################### [ 50%] > 2:rubygem-json-gui ########################################### [100%] > # rpm -qf /usr/lib/ruby/site_ruby/1.8/json/editor.rb > rubygem-json-gui-1.4.3-2.fc13.i686 > # rpm -qf /usr/lib/ruby/site_ruby/1.8/json > file /usr/lib/ruby/site_ruby/1.8/json is not owned by any package > ----------------------------------------------------- > With -2, the directory /usr/lib/ruby/site_ruby/1.8/json is owned > by ruby-json (and rubygem-json-gui should not require ruby-json) moved to ruby-json-gui And rubygem-json-gui requires rubygem-json > > One resolution is to create ruby-json-gui package, move > /usr/lib/ruby/site_ruby/1.8/json/editor.rb to ruby-json-gui, and > make ruby-json-gui have "Requires: ruby-json" (although > in this case ruby-json-gui has only one file...) alrighty, there's a scratch build at http://koji.fedoraproject.org/koji/taskinfo?taskID=2245664 Could you test it so that I can re-tag and build for live. I'll try to grab this tonight for testing. I don't have F13 at work. The needs I have are primarily for EPEL. I apparently missed the window that had that scratch build live. I am sorry. As long as the requirements for GTK were removed, I'll probably be happy. I just want to be able to install the json gem on servers without pulling in the entire gtk stack. any update on this? Yeah, can you try this one so that I can push this to bodhi? http://koji.fedoraproject.org/koji/taskinfo?taskID=2340697 Working fine. Was it intentional to have ruby-json require rubygem-json? They appear to provide different files, which is mildly confusing to me. Either way, my main concern was having to pull in GTK libs to parse json. That looks like it is fixed. Thanks. (In reply to comment #21) > Was it intentional to have ruby-json require rubygem-json? - It is because files in ruby-json are actually symlinks to files in rubygem-json, and also this is a must item on: https://fedoraproject.org/wiki/Packaging/Ruby#Packaging_for_Gem_and_non-Gem_use For EPEL-5, it looks good. For devel and F-13, one need fixing. - Currently with only rubygem-json and rubygem-json-gui installed, * the directory %{ruby_sitelib}/%{gemname} is not owned by any packages (this directory is owned by ruby-json) * however rubygem-json-gui has one file (editor.rb) under %{ruby_sitelib}/%{gemname} One possible solution is to move "%dir %{ruby_sitelib}/%{gemname}" from ruby-%{gemname} to main package. Any update? This is still blocking a bug I have open in EPEL. I will update to latest release later tonight and merge the fix as well. in reply to comment #22 Fixed as well in F-12 and F-13 just not committed yet. alright thing has been pushed to scm, however, fedpkg won't let me build due to broken python attribute and I can't request build directly from koji. Will check that closer tomorrow hopefully. (In reply to comment #25) > alright thing has been pushed to scm, however, fedpkg won't let me build due to > broken python attribute and I can't request build directly from koji. > > Will check that closer tomorrow hopefully. Install the newest koji package: https://admin.fedoraproject.org/updates/koji-1.4.0-4.fc14 alrighty, thing are back ok. build has been done and will hit updates/testing and other soon(ish). sorry for the late. rubygem-json-1.4.3-3.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/rubygem-json-1.4.3-3.el5 I decided to create an update for EL5. It will resolve several bugs when completed. rubygem-json-1.4.3-3.el5 has been pushed to the Fedora EPEL 5 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'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/rubygem-json-1.4.3-3.el5 rubygem-json-1.4.3-3.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report. |