Redmine in Fedora?

Emanuel Rietveld codehotter at gmail.com
Thu Jul 19 12:47:04 UTC 2012


On Thu, Jul 19, 2012 at 2:14 PM, Vít Ondruch <vondruch at redhat.com> wrote:
> Dne 19.7.2012 09:51, Emanuel Rietveld napsal(a):
>
>> 1. I've been following the discussion about bundler and system libraries
>> with interest. On my Fedora 17 and 18 systems, I have applied a small patch
>> to get bundler to call spec.activate on the gem instead of using its own
>> method of activating gems, and since then bundler has loaded all system gems
>> (installed with rpm) without issue. Despite that, I have chosen not to use
>> bundler for redmine, because it was easier. I don't think it would be much
>> trouble to use it, provided that small patch could be applied to Fedora
>> bundler.
>
>
> Hm, I saw that patch somewehere, but it was probably incompatible with older
> RubyGems, therefore not applicable for Bundler. On the other hand, there is
> plenty RubyGems version specific hacks, so that might be another one.
>
>

This was the patch. I expect it to change nothing on rubygems versions
older than 1.8, where spec.activate was introduced. In my humble
opinion, calling into rubygems to activate gems has some advantages
over duplicating the gem activation code in bundler. For Fedora, the
main advantage is that bundler activates rpm installed gems correctly.

diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index 52e3dc6..8683cf7 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -31,9 +31,13 @@ module Bundler
           raise e
         end

-        Bundler.rubygems.mark_loaded(spec)
-        load_paths = spec.load_paths.reject {|path| $LOAD_PATH.include?(path)}
-        $LOAD_PATH.unshift(*load_paths)
+        if spec.respond_to?(:activate)
+          spec.activate
+        else
+          Bundler.rubygems.mark_loaded(spec)
+          load_paths = spec.load_paths.reject {|path|
$LOAD_PATH.include?(path)}
+          $LOAD_PATH.unshift(*load_paths)
+        end
       end

       lock

>
>> The right thing to do is to work hard, track development of all
>> dependency relationships on Fedora (perhaps responsibility of package
>> maintainer), know when api-breaking changes are going to happen and
>> work with upstreams as early as possible to move them over to the new
>> version.
>
>
> I like this scenario, but who will do that? If you volunteer, then there is
> no problem :) But it means that you will become more or less Redmine
> developer.
>
> Vit
>

And what about packaging guidelines? Will we refuse to accept packages
into Fedora unless the package maintainer assumes that responsibility?
What if I accept the responsibility, but am slow to update redmine
(I'm a volunteer after all). Does that block the update of rubygem-foo
until I get around to it? Do we only update gems in rawhide? Do we
allow unresolvable dependencies in released Fedora versions? Do we
keep two versions of rubygem-foo in Fedora for the mean time?

Emanuel


More information about the ruby-sig mailing list