Prep, build and install

Bohuslav Kabrda bkabrda at redhat.com
Thu Dec 22 08:38:48 UTC 2011


Hi, Steve.

> >> 
> >> Hi,
> >> 
> >> I noticed the link to the new ruby packaging draft and had a
> >> comment.
> >> 
> >> Currently the guidelines suggest to do everything basically within
> >> prep with build and install empty.
> >> 
> > 
> > Not really - the guidelines say, that you should use %prep for the
> > gem install command (which basically unpacks the gem into a proper
> > directory structure) and %install to place the files precisely
> > where we need to under %{buildroot}.
> > 
> Bohuslav,
> 
> Indeed you are correct, this has changed to some extent with this new
> draft where now not eveything is done in %install which is the case
> in the current guidelines.
> 
> But still the question of patching still arises, for the binary
> extension in the gem where would you patch it, surley the gem has to
> be unpacked as sepaerate step, its the only way you can get a patch
> in there.
> 

As I mentioned in my previous mail, it is perfectly ok to use gem install in %prep, then patch the binary extension and use %build to recompile it. Otherwise, if it compiles ok, we have no problem, do we?

> Also when i was reviewing a ruby package i had to unpack myself so
> that i could check the contents of files for licensing. This is by
> hand then rather than the normall "rpmbuild -bp"
> 

Why? gem install basically untars the gem and in addition it generates the gemspec/rdoc.

> Fundamentally rpms have always unpacked to source before building and
> installing rather than just coverting package formats.
> 

Well, from one point of view, we _are_ just converting. And we conform with the standard packaging guidelines.

> Ill be costructive and learn some more gem options to suggest
> something useful hopefully
> 

As I see it, you have a problem with the fact, that gem install can compile the binary extension in %prep and not in %build, am I right? In this case, I really think it doesn't matter, but let some of the other guys state their opinions.

Bohuslav.

> Thanks,
> 
> Steve.
> 
> >> Can it be considered to break this up into the prep build and
> >> install
> >> sections.
> >> The gem can unpacked in prep and im hoping its possible to build
> >> and
> >> then install from that unpack...( i dont know how to do this or if
> >> is possiblE?)
> >> 
> > 
> > I think that it wouldn't make much sense - the install command in
> > %prep does everything we need - unpacks the gem into a proper
> > directory structure (and compiles the binary extension, if any).
> > This way you can use %prep to apply patches and then, if you need
> > to recompile a patched C extension (if any), the %build section is
> > the place to do it. Otherwise, I see no point in using %build
> > section with rubygems.
> > 
> 
> 
> >> In the current situation it is not obvious how you would apply a
> >> patch in the rpm and probably more importly the "rpmbuild -bp",
> >> "rpmbuild -bc" or "rpmbuild -bi" do not have there normal meaning.
> >> 
> >> 
> > 
> > Yes, well, if you have nothing to compile, it makes perfect sense
> > to leave the %build section empty, doesn't it? And you use %prep
> > to unpack the gem and %install to place it into a proper directory
> > structure. What's wrong with that? I think that it works exactly
> > as it should.
> > 
> > Regards,
> > Bohuslav.
> > 
> >> --
> >> Steve Traylen
> >> _______________________________________________
> >> ruby-sig mailing list
> >> ruby-sig at lists.fedoraproject.org
> >> https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
> > _______________________________________________
> > ruby-sig mailing list
> > ruby-sig at lists.fedoraproject.org
> > https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
> _______________________________________________
> ruby-sig mailing list
> ruby-sig at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/ruby-sig


More information about the ruby-sig mailing list