From caess at ithiriel.com Mon Jun 28 02:02:08 2010 From: caess at ithiriel.com (Chris Ess) Date: Mon, 28 Jun 2010 02:02:08 -0400 Subject: [Gem2rpm-devel] Patches for gem2rpm Message-ID: <4C283AE0.7020100@ithiriel.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 I have attached patches for issues I've found today when using gem2rpm. All of these patches have been applied to my copy of gem2rpm on github at http://github.com/caess/gem2rpm * Patch 1: pessimistic_version_constraint.patch gem2rpm doesn't properly handle the use of pessimistic version constraints in gem specifications. When a gem specifies a requirement, e.g. "gherkin ~> 2.0.2", gem2rpm puts this in the spec file: Requires: rubygem(gherkin) ~> 2.0.2 This causes rpmbuild to choke because this isn't supported syntax for RPM requirements. (The associated commits are 285c542b1be4b328137b, 6b1a6b6dbc4e618366d8, and 53c94a4735c0a4d097c2.) * Patch 2: suppress_development_only_requirements.patch and test-1.0.0.gem gem2rpm includes all dependencies as requirements for the RPM in the generated spec file. However, since rubygems 1.2.0, package authors have been able to identify specific requirements as being required for using the gem and others as being required for development work. This patch suppresses the addition of development-only gems to the requirements list in the RPM spec file. test-1.0.0.gem is used for testing this functionality. It should be placed in a new directory, test/artifacts/ (This patch may benefit from being recreated from github. The associated commits are d08264763013a3ddde12 and d08264763013a3ddde12.) * Patch 3: use_requirement_if_available.patch rubygems 1.3.6 deprecates Gem::Dependency#version_requirements. This patch makes gem2rpm use Gem::Dependency#requirement if it is available. I could not think of a good unit test for this so I haven't included one. (The associated commit is 75782bc08d44898b0d89.) Please let me know if there any adjustments you'd like me to make to these. Best regards, Chris Ess System Administrator / CDTT (Certified Duct Tape Technician) -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBCAAGBQJMKDrKAAoJEDjp7N7WGgQ39uUQAJzv8yu0zx1qlobTLhfrKtIZ dmB0/Kn8WxxIKPpnXjBSjSfY/JExkKMn6xesRyAaZPtoU89+Rv84DmSYB/1AYQzx QOFshZ+CNbx1BQjjn27jSctwdYkqMeMk3/R3yYwksobJfteV2MGhe413SgJEqJpG Qmem9Uj81mRF34bhwZhBhBIoHbb/U+DIOEPI1HoMyiP7osC1BvymGZcBtWfaqNp2 VXI9VkG9FSQ6U0F2t07D5UD/q2gpTTdXS20rfZS7g0uKE6eBSwdmxtaI3al9swlG rzhR9s4LCi2NPRP55nEGDwR/LIRuf0gu5Bqub47C2SJqf8tgFah+jBbXMPs/6Pkp cChJX1mbm5RbNgnrS1HfwvjbplmaV8/+e3mIubXMIl7NDYup7gn4hcxCHGPy1/1P M1ljD33FHsoz/wC7WSIhc+PtPO355LDB9ayW30Aoy8VY9ZnXXAyPz2QSdBnApIRJ 8/sJe9NUKyoRiQqsD4T8Ts8WwCqGu8HCGTQgu/strx+OEeDoeIy2ledu/3fwOwbH ToNIlE+D0taxDp5lMbilwnyq+cSql5NVvX5bsuwsUIqRlefYL3WRCQw0HUhRqZc9 IgfoWNTND8imQhiG2Tl5wBJ0ZGJpYEU9cmM0ffJuRMLnfiJeFXiohAC7zo1Wwz5X HJQiAh1+qv+ZuY0n0Kig =2der -----END PGP SIGNATURE----- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: use_requirement_if_available.patch URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pessimistic_version_constraint.patch URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: suppress_development_only_required_gems.patch URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test-1.0.0.gem Type: application/octet-stream Size: 3584 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: use_requirement_if_available.patch.sig Type: application/octet-stream Size: 543 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pessimistic_version_constraint.patch.sig Type: application/octet-stream Size: 543 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: suppress_development_only_required_gems.patch.sig Type: application/octet-stream Size: 543 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test-1.0.0.gem.sig Type: application/octet-stream Size: 543 bytes Desc: not available URL: